Skip to content

undefined behavior: signed integer overflow in minmea_scan() #56

Description

@invd

Fuzzing with libFuzzer shows that the following multiplication can lead to undefined behavior:

minmea/minmea.c

Line 186 in 06ad5a1

scale *= 10;

UndefinedBehavior Sanitizer warning:

minmea.c:186:39: runtime error: signed integer overflow: 1000000000 * 10 cannot be represented in type 'int'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior minmea.c:186:39 in 

Example input:
$y$GGA,,.0651205658

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions