Skip to content

Commit cadb1d6

Browse files
authored
Add files via upload
1 parent 633fc92 commit cadb1d6

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
| test.c:6:3:6:8 | call to memset | Argument '$@' will be checked later. | test.c:6:17:6:20 | len1 | len1 |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
experimental/Security/CWE/CWE-020/LateCheckOfFunctionArgument.ql
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
void workFunction_0(char *s) {
2+
int len = 5, len1;
3+
char buf[80], buf1[8];
4+
if(len<0) return;
5+
memset(buf,0,len); //GOOD
6+
memset(buf1,0,len1); //BAD
7+
if(len1<0) return;
8+
}

0 commit comments

Comments
 (0)