Skip to content

Commit

Permalink
pcUtil Fix parser overflow when querying power modes.
Browse files Browse the repository at this point in the history
Because the response buffer was too short, querying power modes
overflow and return stack junk (usually zero) instead of giving
the actual power mode.

See: krontech/chronos-cam-app#137
  • Loading branch information
oskirby committed Jan 11, 2020
1 parent 1580713 commit bf0fc10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pcUtil/comms.c
Expand Up @@ -91,7 +91,7 @@ BOOL setPowerupMode(uint8 mode)

BOOL getPowerupMode(uint8 * mode)
{
uint8 response[1];
uint8 response[2];
uint16 length;
txByteMessage(COM_CMD_GET_POWERUP_MODE);

Expand Down

0 comments on commit bf0fc10

Please sign in to comment.