File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
java/ql/lib/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,12 @@ private class ArrayUpdateConfig extends TaintTracking2::Configuration {
84
84
private class StaticInitializationVectorSource extends DataFlow:: Node {
85
85
StaticInitializationVectorSource ( ) {
86
86
exists ( StaticByteArrayCreation array | array = this .asExpr ( ) |
87
- not exists ( ArrayUpdateConfig config | config .hasFlow ( DataFlow2:: exprNode ( array ) , _) )
87
+ not exists ( ArrayUpdateConfig config | config .hasFlow ( DataFlow2:: exprNode ( array ) , _) ) and
88
+ // Reduce FPs from utility methods that return an empty array in an exceptional case
89
+ not exists ( ReturnStmt ret |
90
+ array .getADimension ( ) .( CompileTimeConstantExpr ) .getIntValue ( ) = 0 and
91
+ DataFlow:: localExprFlow ( array , ret .getResult ( ) )
92
+ )
88
93
)
89
94
}
90
95
}
You can’t perform that action at this time.
0 commit comments