C++: Accept regression in test after evaluator fix

This commit is contained in:
Jonas Jensen
2023-08-18 13:30:20 +02:00
parent 222aa41bbf
commit cd1f196848
2 changed files with 2 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
| tests2.cpp:59:3:59:10 | call to snprintf | This 'call to snprintf' operation is limited to 13 bytes but the destination is only 2 bytes. |
| tests.c:43:3:43:10 | call to snprintf | This 'call to snprintf' operation is limited to 111 bytes but the destination is only 110 bytes. |
| tests.c:46:3:46:10 | call to snprintf | This 'call to snprintf' operation is limited to 111 bytes but the destination is only 110 bytes. |

View File

@@ -56,7 +56,7 @@ void test3() {
dest1 = (char*)malloc(sizeof(src));
if (!dest1)
return;
snprintf(dest1, sizeof(src), "%s", src); // GOOD
snprintf(dest1, sizeof(src), "%s", src); // GOOD [FALSE POSITIVE]
dest2 = (char*)malloc(3);
if (!dest2)
return;