File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
cpp/ql/src/experimental/Security/CWE/CWE-193 Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -187,12 +187,14 @@ module ArrayAddressToDerefConfig implements DataFlow::StateConfigSig {
187187 predicate observeDiffInformedIncrementalMode ( ) { any ( ) }
188188
189189 Location getASelectedSourceLocation ( DataFlow:: Node source ) {
190- exists ( Variable v | result = v .getLocation ( ) | isSourceImpl ( source , v ) )
190+ exists ( Variable v | result = v .getLocation ( ) or result = source .getLocation ( ) |
191+ isSourceImpl ( source , v )
192+ )
191193 }
192194
193195 Location getASelectedSinkLocation ( DataFlow:: Node sink ) {
194196 exists ( PointerArithmeticInstruction pai , Instruction deref |
195- result = [ pai , deref ] .getLocation ( ) and
197+ result = [ [ pai , deref ] .getLocation ( ) , sink . getLocation ( ) ] and
196198 isInvalidPointerDerefSink2 ( sink , deref , _) and
197199 isSink ( sink , ArrayAddressToDerefConfig:: TOverflowArithmetic ( pai ) )
198200 )
You can’t perform that action at this time.
0 commit comments