mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
[DIFF-INFORMED] Go: AllocationSizeOverflow
https://github.com/d10c/codeql/blob/d10c/diff-informed-phase-3/go/ql/src/Security/CWE-190/AllocationSizeOverflow.ql#L24
This commit is contained in:
@@ -56,6 +56,17 @@ module AllocationSizeOverflow {
|
||||
succ = c
|
||||
)
|
||||
}
|
||||
|
||||
predicate observeDiffInformedIncrementalMode() { any() }
|
||||
|
||||
Location getASelectedSinkLocation(DataFlow::Node sink) {
|
||||
result = sink.getLocation()
|
||||
or
|
||||
exists(DataFlow::Node allocsz |
|
||||
isSinkWithAllocationSize(sink, allocsz) and
|
||||
result = allocsz.getLocation()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/** Tracks taint flow to find allocation-size overflows. */
|
||||
|
||||
Reference in New Issue
Block a user