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) {
1010 not exists ( array .getInit ( ) )
1111 or
1212 // 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 }`)
1316 array .getInit ( ) .getAnInit ( ) .getAChildExpr ( ) instanceof IntegerLiteral
1417 or
1518 // creating an array wit an initializer like `new byte[] { 1, 2 }`
@@ -28,7 +31,7 @@ private class StaticByteArrayCreation extends ArrayCreationExpr {
2831 }
2932}
3033
31- /** Defines a sub-set of expressions that update an array. */
34+ /** An expression that updates ` array` . */
3235private class ArrayUpdate extends Expr {
3336 Expr array ;
3437
You can’t perform that action at this time.
0 commit comments