From ce766b72d5958315744ea4bfbdb40e6c7c11146a Mon Sep 17 00:00:00 2001 From: Gabriel Wang Date: Thu, 9 Mar 2023 00:55:10 +0000 Subject: [PATCH] fix shell buffer overflow issue --- src/PikaObj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PikaObj.c b/src/PikaObj.c index 9d07002bf..1423ec7d8 100644 --- a/src/PikaObj.c +++ b/src/PikaObj.c @@ -1405,8 +1405,8 @@ enum shellCTRL _do_obj_runChar(PikaObj* self, int16_t n = byte_count; while (n--) { - pika_assert(PIKA_FALSE != - byteQueue_readOne(queue, (uint8_t*)&inputChar)); + result = byteQueue_readOne(queue, (uint8_t*)&inputChar); + pika_assert(PIKA_FALSE != result); if (SHELL_CTRL_EXIT == _inner_do_obj_runChar(self, inputChar, shell)) {