File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
java/ql/src/experimental/semmle/code/java/security Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ private predicate initializedWithConstants(ArrayCreationExpr array) {
10
10
not exists ( array .getInit ( ) )
11
11
or
12
12
// creating a multidimensional array with an initializer like `{ new byte[8], new byte[16] }`
13
+ // This works around https://github.com/github/codeql/issues/6552 -- change me once there is
14
+ // a better way to distinguish nested initializers that create zero-filled arrays
15
+ // (e.g. `new byte[1]`) from those with an initializer list (`new byte[] { 1 }` or just `{ 1 }`)
13
16
array .getInit ( ) .getAnInit ( ) .getAChildExpr ( ) instanceof IntegerLiteral
14
17
or
15
18
// creating an array wit an initializer like `new byte[] { 1, 2 }`
@@ -28,7 +31,7 @@ private class StaticByteArrayCreation extends ArrayCreationExpr {
28
31
}
29
32
}
30
33
31
- /** Defines a sub-set of expressions that update an array. */
34
+ /** An expression that updates ` array` . */
32
35
private class ArrayUpdate extends Expr {
33
36
Expr array ;
34
37
You can’t perform that action at this time.
0 commit comments