mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
CPP: Unify and improve the MallocCall classes.
This commit is contained in:
@@ -22,12 +22,12 @@ void tests3(int case_num)
|
||||
switch (case_num)
|
||||
{
|
||||
case 1:
|
||||
buffer = (char *)std::malloc(strlen(str3global)); // BAD [NOT DETECTED]
|
||||
buffer = (char *)std::malloc(strlen(str3global)); // BAD
|
||||
strcpy(buffer, str3global);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
buffer = (char *)std::malloc(strlen(str3local)); // BAD [NOT DETECTED]
|
||||
buffer = (char *)std::malloc(strlen(str3local)); // BAD
|
||||
strcpy(buffer, str3local);
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user