Skip to content

Commit f41828e

Browse files
Better qldoc in StaticInitializationVectorQuery.qll
Co-authored-by: Chris Smowton <smowton@github.com>
1 parent f97c8bb commit f41828e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/ql/src/experimental/semmle/code/java/security/StaticInitializationVectorQuery.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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`. */
3235
private class ArrayUpdate extends Expr {
3336
Expr array;
3437

0 commit comments

Comments
 (0)