C++: respond to PR comments

This commit is contained in:
Robert Marsh
2019-10-02 11:21:10 -07:00
parent 68c38ba34a
commit 4018ed67a6
7 changed files with 9 additions and 12 deletions

View File

@@ -36,7 +36,7 @@ predicate spaceProblem(FunctionCall append, string msg) {
buffer.getAnAccess() = strlen.getStringExpr() and
(
insert.getTarget().hasGlobalOrStdName("strcpy") or
insert.getTarget().hasGlobalName("strncpy")
insert.getTarget().hasGlobalOrStdName("strncpy")
) and
(
append.getTarget().hasGlobalOrStdName("strcat") or

View File

@@ -58,7 +58,7 @@ predicate overflowOffsetInLoop(BufferAccess bufaccess, string msg) {
}
predicate bufferAndSizeFunction(Function f, int buf, int size) {
f.hasGlobalOrStdName("read") and buf = 1 and size = 2
f.hasGlobalName("read") and buf = 1 and size = 2
or
f.hasGlobalOrStdName("fgets") and buf = 0 and size = 1
or