Skip to content

Commit cde41f4

Browse files
system/fastboot: Fix Out-of-bounds Write
CID 329130: (apache#3 of 3): 越界写入 (OVERRUN) 6. overrun-local: 在字节偏移 64 处使用索引 r(其值为 64)越界 64 字节访问数组 buffer Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
1 parent 0db1389 commit cde41f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

system/fastboot/fastboot.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ static void fastboot_command_loop(FAR struct fastboot_ctx_s *context)
847847

848848
while (1)
849849
{
850-
char buffer[FASTBOOT_MSG_LEN];
850+
char buffer[FASTBOOT_MSG_LEN + 1];
851851
size_t ncmds = nitems(g_fast_cmd);
852852
size_t index;
853853

0 commit comments

Comments
 (0)