From bf0fc10326eaef93590611aeeb139f8d74dbc2ff Mon Sep 17 00:00:00 2001 From: Owen Kirby Date: Fri, 10 Jan 2020 16:21:11 -0800 Subject: [PATCH] pcUtil Fix parser overflow when querying power modes. 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: https://github.com/krontech/chronos-cam-app/issues/137 --- src/pcUtil/comms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pcUtil/comms.c b/src/pcUtil/comms.c index a86f4b4..70fa877 100644 --- a/src/pcUtil/comms.c +++ b/src/pcUtil/comms.c @@ -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);