Skip to content

Commit e7c0202

Browse files
committed
CPP: Fix 'BAD'.
1 parent 743b17a commit e7c0202

File tree

1 file changed

+1
-1
lines changed
  • cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize

1 file changed

+1
-1
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/TaintedAllocationSize/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int main(int argc, char **argv) {
4646

4747
int size = tainted * 8;
4848
char *chars1 = (char *)malloc(size); // BAD
49-
char *chars2 = new char[size]; // BA
49+
char *chars2 = new char[size]; // BAD
5050
char *chars3 = new char[8]; // GOOD
5151

5252
arr1 = (MyStruct *)realloc(arr1, sizeof(MyStruct) * tainted); // BAD

0 commit comments

Comments
 (0)