-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Brodes/wcharcharconversion false positives upstream5 #17611
base: main
Are you sure you want to change the base?
Brodes/wcharcharconversion false positives upstream5 #17611
Conversation
@jketema Let me know if these commits give you what you need. I did screw something up, and failed to have my first commit stipulate explicitly the false positives in the test case, they were just marked 'GOOD'. I'll try to mark them explicitly for future PRs though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments
…oid cases where unsigned char is the default char width for `char`.
I believe I got all the comments. Is the protocol that I resolve them? |
cpp/ql/src/change-notes/2024-09-26-wcharcharconversion-false-positives.md
Outdated
Show resolved
Hide resolved
There's no real protocol. I've marked them as resolved. |
…ositives.md Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
…https://github.com/microsoft/codeql into brodes/wcharcharconversion_false_positives_upstream5
I think you need to auto-format the ql file |
Fixed. |
Thanks. I'll kick-off a DCA experiment. If that looks good, we can merge this. |
Addressing false positives with byte arrays. There was an existing check for byte arrays, but there were cases missed. Updated and cleaned up this logic and added test cases to expose the observed false positive.
Also addressed false positives due to types based on macro definitions, and then dynamic checks are used to determine if dangerous widening is performed at runtime. Test cases added to demonstrate the style of check.