Problem
In nmea_parser.hpp:95, strtol is used without checking errno or using the endptr parameter. When strtol fails to parse, it returns 0. When it successfully parses the string "0", it also returns 0. There's no way to distinguish between an error and a valid zero value.
Location
firmware/main/nmea_parser.hpp:95
Severity
HIGH - Invalid hex values silently treated as valid zeros
Suggested Fix
Use strtol with proper endptr checking:
char* endptr;
uint8_t expected = (uint8_t)strtol(expected_str, &endptr, 16);
if (endptr == expected_str || *endptr != '\0') return false;
Problem
In
nmea_parser.hpp:95,strtolis used without checkingerrnoor using theendptrparameter. Whenstrtolfails to parse, it returns 0. When it successfully parses the string "0", it also returns 0. There's no way to distinguish between an error and a valid zero value.Location
firmware/main/nmea_parser.hpp:95Severity
HIGH - Invalid hex values silently treated as valid zeros
Suggested Fix
Use
strtolwith properendptrchecking: