Skip to content

Commit f97be14

Browse files
committed
Fixed argument to block cipher mode method being tagged as input
1 parent 192bb7f commit f97be14

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java/ql/lib/experimental/quantum/BouncyCastle/OperationInstances.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ module Modes {
611611

612612
predicate isIntermediate() { not this.getCallee().getName() = "doFinal" }
613613

614-
Expr getInput() { result = this.getArgument(0) }
614+
Expr getInput() { result = this.getArgument(0) and this.isIntermediate() }
615615

616616
Expr getOutput() {
617617
this.getCallee().getName() = "processBlock" and
@@ -625,6 +625,9 @@ module Modes {
625625
or
626626
this.getCallee().getName() = "returnByte" and
627627
result = this // The return value.
628+
or
629+
this.getCallee().getName() = "doFinal" and
630+
result = this.getArgument(0) // The `out` byte array argument.
628631
}
629632
}
630633

0 commit comments

Comments
 (0)