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:zephyrproject-rtos#35345
Fixes:zephyrproject-rtos#35346

Signed-off-by: Ying ming <mingx.ying@intel.com>
  • Loading branch information
Ying ming committed May 19, 2021
1 parent 7295c19 commit 56ebd03
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 56ebd03

Please sign in to comment.