mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: respond to PR comments
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user