mirror of
https://github.com/github/codeql.git
synced 2026-04-25 08:45:14 +02:00
Use more specific hasGlobalName() for stdlib function free(3)
Based on the CodeQL documentation's example of strncpy(3) and strlen(3): https://codeql.github.com/docs/codeql-language-guides/hash-consing-and-value-numbering/#example-query
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
import cpp
|
||||
|
||||
class FreeCall extends FunctionCall {
|
||||
FreeCall() { this.getTarget().hasName("free") }
|
||||
FreeCall() { this.getTarget().hasGlobalName("free") }
|
||||
}
|
||||
|
||||
from IfStmt stmt, FreeCall fc, Variable v
|
||||
|
||||
Reference in New Issue
Block a user