Skip to content

Fix 14994: False negative: nullPointer with getenv - #8817

Draft
ludviggunne wants to merge 5 commits into
cppcheck-opensource:mainfrom
ludviggunne:14994-null-getenv
Draft

Fix 14994: False negative: nullPointer with getenv#8817
ludviggunne wants to merge 5 commits into
cppcheck-opensource:mainfrom
ludviggunne:14994-null-getenv

Conversation

@ludviggunne

Copy link
Copy Markdown
Collaborator

This adds a new attribute to the library configuration that signifies that a function may return NULL. I was planning to add this to other functions, such as strchr and family, but unfortunately it leads to false positives (see this test case). In any case I think some kind of update to the config format is needed to handle these kind of FNs without hardcoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant