Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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
  • Loading branch information
mario-campos committed Apr 26, 2024
commit 3195f0c8288fd00af329ad25a0043e069a376c40
2 changes: 1 addition & 1 deletion cpp/ql/src/experimental/Best Practices/GuardedFree.ql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down