[C/C++] How to sanitize a class object after its member function change its value? #7692
Unanswered
UniverseExplorer7274
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
codeql binary version: 2.7.5
Hello everyone,
When query path of this code, I got some false-positive paths which I don’t know how to eliminate.
Here is my code and my QL query.
I only want to get the path from
getInput(a)
to the firstsystem
call.However, I got 2 paths.
I think I should write a sanitizer which sanitizer the call to class object member function
assign
whose argument is not tainted. But I don't know how to write it in CodeQL.I have tried to write a sanitizer like this, but the
DataFlow::PathNode
causes Non-monotonic recursion.The expected result is like the following:
there is not path to the second
system
callAny reply will be appreciated. If there is any other information needed, please let me know.
Beta Was this translation helpful? Give feedback.
All reactions