Skip to content

Commit

Permalink
Fix empty buffer parser
Browse files Browse the repository at this point in the history
  • Loading branch information
pvizeli authored Jun 16, 2017
1 parent 7be3c30 commit 9438735
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CmdParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ uint16_t CmdParser::parseCmd(uint8_t *buffer, size_t bufferSize)
m_paramCount = 0;

// buffer is not okay
if (buffer == NULL || bufferSize == 0) {
if (buffer == NULL || bufferSize == 0 || buffer[0] == 0x00) {
return CMDPARSER_ERROR;
}

Expand Down

0 comments on commit 9438735

Please sign in to comment.