Skip to content

Commit daae010

Browse files
committed
Fix IncorrectIntegerConversion for use-use flow
We were assuming that `sink` only had one successor, the TypeCastNode, but it can now have an adjacent use as well.
1 parent eec8562 commit daae010

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

go/ql/src/Security/CWE-681/IncorrectIntegerConversionQuery.ql

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import semmle.go.security.IncorrectIntegerConversionLib
1818
import Flow::PathGraph
1919

2020
from
21-
Flow::PathNode source, Flow::PathNode sink, DataFlow::CallNode call, DataFlow::Node sinkConverted
21+
Flow::PathNode source, Flow::PathNode sink, DataFlow::CallNode call,
22+
DataFlow::TypeCastNode sinkConverted
2223
where
2324
Flow::flowPath(source, sink) and
2425
call.getResult(0) = source.getNode() and

0 commit comments

Comments
 (0)