mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
[zlaski/memset-model] Remove taint tracking from Memset.qll. Add Memset.qll to Models.qll.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
private import implementations.IdentityFunction
|
||||
private import implementations.Inet
|
||||
private import implementations.Memcpy
|
||||
private import implementations.Memset
|
||||
private import implementations.Printf
|
||||
private import implementations.Pure
|
||||
private import implementations.Strcat
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
import semmle.code.cpp.Function
|
||||
import semmle.code.cpp.models.interfaces.ArrayFunction
|
||||
import semmle.code.cpp.models.interfaces.DataFlow
|
||||
import semmle.code.cpp.models.interfaces.Taint
|
||||
|
||||
/**
|
||||
* The standard function `memset` and its assorted variants
|
||||
*/
|
||||
class MemsetFunction extends ArrayFunction, DataFlowFunction, TaintFunction {
|
||||
class MemsetFunction extends ArrayFunction, DataFlowFunction {
|
||||
MemsetFunction() {
|
||||
hasGlobalName("memset") or
|
||||
hasGlobalName("wmemset") or
|
||||
hasGlobalName("bzero") or
|
||||
hasGlobalName("__builtin_memset") or
|
||||
hasQualifiedName("std", "memset")
|
||||
hasGlobalName("__builtin_memset_chk") or
|
||||
hasQualifiedName("std", "memset") or
|
||||
hasQualifiedName("std", "wmemset")
|
||||
}
|
||||
|
||||
override predicate hasArrayOutput(int bufParam) { bufParam = 0 }
|
||||
|
||||
Reference in New Issue
Block a user