Skip to content

Commit

Permalink
tests: libc: Update libc testcases to solve coverity issues
Browse files Browse the repository at this point in the history
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 <mingx.ying@intel.com>
  • Loading branch information
Ying ming authored and galak committed May 19, 2021
1 parent db4359c commit 4f8318f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/lib/c_lib/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 4f8318f

Please sign in to comment.