Skip to content

Commit 775d432

Browse files
Main: Fix length check for GET_LAST_STATUS
1 parent 0ab3213 commit 775d432

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ void resetSystem() {
7777
cmd_result processCommand(uint8_t cmd, uint8_t * datain, uint8_t len, uint8_t *dataout, uint8_t maxLen) {
7878
switch (cmd) {
7979
case Commands::GET_LAST_STATUS: {
80-
if (len != 0 || maxLen < 1)
80+
if (len != 0 || maxLen < 2)
8181
return cmd_result(Status::INVALID_ARGUMENTS);
8282

8383
// Note that we run inside an interrupt, so there is no race condition here

0 commit comments

Comments
 (0)