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:
Mario Campos
2024-04-26 09:10:40 -05:00
parent d7c784ef2f
commit 3195f0c828

View File

@@ -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