Skip to content

Commit

Permalink
Merge pull request #121 from drak7/master
Browse files Browse the repository at this point in the history
Bugfix for parseCoord
  • Loading branch information
ladyada authored Jun 4, 2020
2 parents e730f81 + e5ad893 commit 2b20565
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 2b20565

Please sign in to comment.