Skip to content

Commit

Permalink
Bugfix for parseCoord
Browse files Browse the repository at this point in the history
  • Loading branch information
drak7 committed Jun 4, 2020
1 parent e730f81 commit e5ad893
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NMEA_parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ bool Adafruit_GPS::parseCoord(char *pStart, nmea_float_t *angleDegrees,
char *p = pStart;
if (!isEmpty(p)) {
// get the number in DDDMM.mmmm format and break into components
char degreebuff[10];
char degreebuff[10] = {0}; // Ensure string is terminated after strncpy
char *e = strchr(p, '.');
if (e == NULL || e - p > 6)
return false; // no decimal point in range
Expand Down

0 comments on commit e5ad893

Please sign in to comment.