-
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
Milestone
Description
Static code scan issues found in file:
Category: Null pointer dereferences
Function: test_print
Component: Tests
CID: 220413
Details:
zephyr/tests/lib/sprintf/src/main.c
Line 748 in 169144a
| ret = fprintf(p, "%d", i); |
742 int ret, i = 3;
743 FILE *p = NULL;
744
745 ret = fprintf(stdout, "%d", i);
746 zassert_equal(ret, 1, "fprintf failed!");
747
>>> CID 220413: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "p" to "fprintf", which dereferences it. [Note: The source code implementation of the function has been overridden by a builtin model.]
748 ret = fprintf(p, "%d", i);
749 zassert_not_equal(ret, 1, "fprintf failed!");
750
751 ret = fprintf(stdout, "", i);
752 zassert_not_equal(ret, 1, "fprintf failed!");
753
22 new defect(s) introduced to Zephyr found with Coverity Scan.
21 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed by Coverity Scan.
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