Skip to content

Commit 0598645

Browse files
committed
C++: Add 'mremap' to whitelist.
1 parent c6b7bb4 commit 0598645

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

cpp/ql/src/Security/CWE/CWE-121/UnterminatedVarargsCall.ql

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,7 @@ class VarargsFunction extends Function {
6767
not exists(FunctionCall fc, int index | this.nonTrailingVarArgValue(fc, index) = result)
6868
}
6969

70-
predicate isWhitelisted() {
71-
this.hasGlobalName("open") or
72-
this.hasGlobalName("fcntl") or
73-
this.hasGlobalName("ptrace")
74-
}
70+
predicate isWhitelisted() { this.hasGlobalName(["open", "fcntl", "ptrace", "mremap"]) }
7571
}
7672

7773
from VarargsFunction f, FunctionCall fc, string terminator, int cnt, int totalCount

0 commit comments

Comments
 (0)