mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
C++: Use getQualifiedName() = "gets", not hasName
This fixes false positives on https://lgtm.com/projects/g/brandonpelfrey/Construct caused by a member function named `gets` -- probably short for "get s".
This commit is contained in:
@@ -16,7 +16,7 @@ predicate potentiallyDangerousFunction(Function f, string message) {
|
||||
f.getQualifiedName() = "gmtime" and
|
||||
message = "Call to gmtime is potentially dangerous"
|
||||
) or (
|
||||
f.hasName("gets") and
|
||||
f.getQualifiedName() = "gets" and
|
||||
message = "gets does not guard against buffer overflow"
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user