Skip to content

Commit 741eed9

Browse files
committed
C++: Replace minimum(any(...)) with a min aggregate. Also removed the min aggregate further down since it's no longer needed.
1 parent 6103aab commit 741eed9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/src/Critical/OverflowStatic.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class CallWithBufferSize extends FunctionCall {
101101
// result in this case we pick the minimum value obtainable from dataflow and range analysis.
102102
result =
103103
upperBound(statedSizeExpr())
104-
.minimum(any(Expr statedSizeSrc |
104+
.minimum(min(Expr statedSizeSrc |
105105
DataFlow::localExprFlow(statedSizeSrc, statedSizeExpr())
106106
|
107107
statedSizeSrc.getValue().toInt()
@@ -112,7 +112,7 @@ class CallWithBufferSize extends FunctionCall {
112112
predicate wrongBufferSize(Expr error, string msg) {
113113
exists(CallWithBufferSize call, int bufsize, Variable buf, int statedSize |
114114
staticBuffer(call.buffer(), buf, bufsize) and
115-
statedSize = min(call.statedSizeValue()) and
115+
statedSize = call.statedSizeValue() and
116116
statedSize > bufsize and
117117
error = call.statedSizeExpr() and
118118
msg =

0 commit comments

Comments
 (0)