Skip to content

Commit cd561dd

Browse files
authored
Update test.cpp
1 parent 2959150 commit cd561dd

File tree

1 file changed

+3
-0
lines changed
  • cpp/ql/test/experimental/query-tests/Security/CWE/CWE-476/semmle/tests

1 file changed

+3
-0
lines changed

cpp/ql/test/experimental/query-tests/Security/CWE/CWE-476/semmle/tests/test.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ void funcWork1b() {
7373

7474
void funcWork1() {
7575
int a;
76+
int i;
7677
myGlobalData *valData = new myGlobalData;
7778
valData->sizeInt = 10;
7879
valData->bufMyData = new myData*[valData->sizeInt];
80+
for (i = 0; i < valData->sizeInt; i++)
81+
valData->bufMyData[i] = 0;
7982
try {
8083
cleanFunction();
8184
throwFunction(a);

0 commit comments

Comments
 (0)