File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
cpp/ql/src/semmle/code/cpp/models Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
private import implementations.IdentityFunction
2
2
private import implementations.Inet
3
3
private import implementations.Memcpy
4
+ private import implementations.Memset
4
5
private import implementations.Printf
5
6
private import implementations.Pure
6
7
private import implementations.Strcat
Original file line number Diff line number Diff line change 1
1
import semmle.code.cpp.Function
2
2
import semmle.code.cpp.models.interfaces.ArrayFunction
3
3
import semmle.code.cpp.models.interfaces.DataFlow
4
- import semmle.code.cpp.models.interfaces.Taint
5
4
6
5
/**
7
6
* The standard function `memset` and its assorted variants
8
7
*/
9
- class MemsetFunction extends ArrayFunction , DataFlowFunction , TaintFunction {
8
+ class MemsetFunction extends ArrayFunction , DataFlowFunction {
10
9
MemsetFunction ( ) {
11
10
hasGlobalName ( "memset" ) or
11
+ hasGlobalName ( "wmemset" ) or
12
12
hasGlobalName ( "bzero" ) or
13
13
hasGlobalName ( "__builtin_memset" ) or
14
- hasQualifiedName ( "std" , "memset" )
14
+ hasGlobalName ( "__builtin_memset_chk" ) or
15
+ hasQualifiedName ( "std" , "memset" ) or
16
+ hasQualifiedName ( "std" , "wmemset" )
15
17
}
16
18
17
19
override predicate hasArrayOutput ( int bufParam ) { bufParam = 0 }
You can’t perform that action at this time.
0 commit comments