-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Closed
Copy link
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Static code scan issues found in file:
Category: Memory - corruptions
Function: test_memcpy
Component: Tests
CID: 236074
Details:
zephyr/tests/lib/c_lib/src/main.c
Line 557 in 21d1ad3
| zassert_equal(memcpy(mem_dest_tmp, mem_src_tmp, 10), |
551
552 /* restore the environment */
553 memset(mem_dest_byte, '\0', sizeof(mem_dest));
554 /* verify when dest and src are all in not word aligned */
555 mem_dest_tmp = mem_dest_byte + sizeof(uintptr_t) - 1;
556 mem_src_tmp = mem_src_byte + sizeof(uintptr_t) - 1;
>>> CID 236074: Memory - corruptions (OVERRUN)
>>> Overrunning buffer pointed to by "mem_dest_tmp" of 12 bytes by passing it to a function which accesses it at byte offset 12 using argument "10U". [Note: The source code implementation of the function has been overridden by a builtin model.]
557 zassert_equal(memcpy(mem_dest_tmp, mem_src_tmp, 10),
558 mem_dest_tmp, "memcpy error");
559 zassert_equal(memcmp(mem_dest_tmp, mem_src_tmp, 10),
560 0, "memcpy failed");
561
562 /* restore the environment */
Please fix or provide comments in coverity using the link:
https://scan9.coverity.com/reports.htm#v29271/p12996
Note: This issue was created automatically. Priority was set based on classification
of the file affected and the impact field in coverity. Assignees were set using the CODEOWNERS file.
Metadata
Metadata
Assignees
Labels
CoverityA Coverity detected issue or its fixA Coverity detected issue or its fixbugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug