Skip to content

Commit 7d67719

Browse files
committed
Go: AllocationSizeOverflow
1 parent 6f3a71f commit 7d67719

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

go/ql/lib/semmle/go/security/AllocationSizeOverflow.qll

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,15 @@ module AllocationSizeOverflow {
5757
)
5858
}
5959

60-
predicate observeDiffInformedIncrementalMode() {
61-
any() // TODO: Make sure that the location overrides match the query's select clause: Column 5 does not select a source or sink originating from the flow call on line 22 (/Users/d10c/src/semmle-code/ql/go/ql/src/Security/CWE-190/AllocationSizeOverflow.ql@25:80:25:86)
60+
predicate observeDiffInformedIncrementalMode() { any() }
61+
62+
Location getASelectedSinkLocation(DataFlow::Node sink) {
63+
result = sink.getLocation()
64+
or
65+
exists(DataFlow::Node allocsz |
66+
isSinkWithAllocationSize(sink, allocsz) and
67+
result = allocsz.getLocation()
68+
)
6269
}
6370
}
6471

0 commit comments

Comments
 (0)