Skip to content

Commit 9438735

Browse files
authored
Fix empty buffer parser
1 parent 7be3c30 commit 9438735

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CmdParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ uint16_t CmdParser::parseCmd(uint8_t *buffer, size_t bufferSize)
2424
m_paramCount = 0;
2525

2626
// buffer is not okay
27-
if (buffer == NULL || bufferSize == 0) {
27+
if (buffer == NULL || bufferSize == 0 || buffer[0] == 0x00) {
2828
return CMDPARSER_ERROR;
2929
}
3030

0 commit comments

Comments
 (0)