Skip to content

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

@invd

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

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions