From 4f8318f10423f9099cb55b26e3039668084a9ea3 Mon Sep 17 00:00:00 2001 From: Ying ming Date: Wed, 19 May 2021 10:21:20 +0800 Subject: [PATCH] tests: libc: Update libc testcases to solve coverity issues The coverity report "Out-of-bounds access". The reason is The room of src and dest buffer is less than the count wanted to be copyied. So enlarged the src and dest buffer to solve this issue. Fixes:#35345 Fixes:#35346 Signed-off-by: Ying ming --- tests/lib/c_lib/src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/lib/c_lib/src/main.c b/tests/lib/c_lib/src/main.c index d2880045cb1ef6..35fc13b3d14bf7 100644 --- a/tests/lib/c_lib/src/main.c +++ b/tests/lib/c_lib/src/main.c @@ -528,8 +528,8 @@ void test_memchr(void) void test_memcpy(void) { /* make sure the buffer is word aligned */ - uintptr_t mem_dest[3] = {0}; - uintptr_t mem_src[3] = {0}; + uintptr_t mem_dest[4] = {0}; + uintptr_t mem_src[4] = {0}; unsigned char *mem_dest_tmp = NULL; unsigned char *mem_src_tmp = NULL;