-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C++: Use TaintTracking::Configuration in TaintedAllocationSize #3519
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
Open
rdmarsh2
wants to merge
12
commits into
github:main
Choose a base branch
from
rdmarsh2:rdmarsh/cpp/tainted-allocation-size-specific-conf
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
bc8c6a7
C++: pointer arg conflation in TaintTrackingUtil
rdmarsh2 1650e07
C++: add local flow sources
rdmarsh2 956a70d
C++: Use TaintTracking::Conf in TaintedAllocationSize
rdmarsh2 ca2f4c3
C++: Add taint test for array-typed fields
rdmarsh2 9bc95da
C++: Autoformat.
geoffw0 eb0da11
C++: Restore hasUpperBoundsCheck.
geoffw0 e8d8db7
Merge pull request #2 from geoffw0/taintedallocsizeir
rdmarsh2 78a4e0d
C++: delete commented out code
rdmarsh2 f3e665c
C++: merge from master and accept test changes
rdmarsh2 249e67f
C++: Add EqualityGuard in TaintedAllocationSize.ql
rdmarsh2 817c59f
Merge branch 'master' into rdmarsh/cpp/tainted-allocation-size-specif…
rdmarsh2 304b8cc
C++: autoformat
rdmarsh2 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
cpp/ql/src/semmle/code/cpp/models/implementations/Getenv.qll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Provides an implementation class modelling the POSIX function `getenv`. | ||
*/ | ||
import cpp | ||
import semmle.code.cpp.models.interfaces.FlowSource | ||
|
||
/** | ||
* The POSIX function `getenv`. | ||
*/ | ||
class Getenv extends LocalFlowFunction { | ||
Getenv() { | ||
this.hasGlobalName("getenv") | ||
} | ||
|
||
override predicate hasLocalFlowSource (FunctionOutput output, string description) { | ||
( | ||
output.isReturnValueDeref() or | ||
output.isReturnValue() | ||
) and | ||
description = "an environment variable" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.