CPP: Be conservative where there are multiple flow sources.

This commit is contained in:
Geoffrey White
2018-11-22 14:41:57 +00:00
parent d57574e92c
commit cb609f4be0

View File

@@ -102,7 +102,7 @@ class CallWithBufferSize extends FunctionCall
predicate wrongBufferSize(Expr error, string msg) {
exists(CallWithBufferSize call, int bufsize, Variable buf, int statedSize |
staticBuffer(call.buffer(), buf, bufsize) and
statedSize = call.statedSizeValue() and
statedSize = min(call.statedSizeValue()) and
statedSize > bufsize and
error = call.statedSizeExpr() and
msg = "Potential buffer-overflow: '" + buf.getName() +