Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

Commit

Permalink
Prevent array-out-of-bounds access.
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger committed Jan 20, 2021
1 parent cd962a0 commit 4293c36
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ArduinoNmeaParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,9 @@ void ArduinoNmeaParser::flushParserBuffer()

bool ArduinoNmeaParser::isCompleteNmeaMessageInParserBuffer()
{
if (_parser_buf_elems < 2)
return false;

char const prev_last = _parser_buf[_parser_buf_elems - 2];
char const last = _parser_buf[_parser_buf_elems - 1];

Expand Down

0 comments on commit 4293c36

Please sign in to comment.