Problem
In gps.cpp:65-66, the condition if (len > 0 && (size_t)len < GPS_BUFFER_SIZE) discards data when exactly GPS_BUFFER_SIZE bytes are received. Should be <= not <.
Location
firmware/main/gps.cpp:65-66
Severity
MEDIUM - Silent data loss when GPS outputs large amount of data
Suggested Fix
Change < GPS_BUFFER_SIZE to <= GPS_BUFFER_SIZE - 1 or handle full buffer case.
Problem
In
gps.cpp:65-66, the conditionif (len > 0 && (size_t)len < GPS_BUFFER_SIZE)discards data when exactlyGPS_BUFFER_SIZEbytes are received. Should be<=not<.Location
firmware/main/gps.cpp:65-66Severity
MEDIUM - Silent data loss when GPS outputs large amount of data
Suggested Fix
Change
< GPS_BUFFER_SIZEto<= GPS_BUFFER_SIZE - 1or handle full buffer case.