Skip to content

Wrong closing parenthesis generates ub shif #39

@dnsampaio

Description

@dnsampaio

Line

checksum += ( unsigned long ) ( statemate_bitlist[ index ] << index );

should read

    checksum += ( unsigned long ) ( statemate_bitlist[ index ]) << index ;

as left shifting a signed value or a char by 63 bits are ub (in clang since at least release 15), see

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions