From 698ebf8a61332479014451b0d56a0ee9e7f9f5fe Mon Sep 17 00:00:00 2001 From: xy420513 Date: Fri, 21 Apr 2023 00:47:43 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E5=AD=97=E7=AC=A6=E6=95=B0=E7=BB=84expe?= =?UTF-8?q?ct=5Fstr=E8=B6=8A=E7=95=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 第389行创建的字符数组str大小只有10,后续412行sprintf的字符串明显超出了10的大小,会发生数组越界,出现问题 --- devices/air724/air724.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/air724/air724.c b/devices/air724/air724.c index 1bb575de..5f334dfa 100644 --- a/devices/air724/air724.c +++ b/devices/air724/air724.c @@ -386,7 +386,7 @@ static int air724_recv(int id, void *buf, size_t len) int air724_send(int id, const void *buf, size_t len) { at_echo_t echo; - char expect_str[10]; + char expect_str[30]; if (tos_at_global_lock_pend() != 0) { return -1;