CPP: Unify and improve the MallocCall classes.

This commit is contained in:
Geoffrey White
2019-04-18 09:51:35 +01:00
parent 1ba8364c3b
commit ca6ba36d87
5 changed files with 16 additions and 5 deletions

View File

@@ -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;