Skip to content

Commit cd1f196

Browse files
committed
C++: Accept regression in test after evaluator fix
1 parent 222aa41 commit cd1f196

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
| 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. |
12
| 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. |
23
| 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. |

cpp/ql/test/query-tests/Security/CWE/CWE-120/semmle/tests/tests2.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void test3() {
5656
dest1 = (char*)malloc(sizeof(src));
5757
if (!dest1)
5858
return;
59-
snprintf(dest1, sizeof(src), "%s", src); // GOOD
59+
snprintf(dest1, sizeof(src), "%s", src); // GOOD [FALSE POSITIVE]
6060
dest2 = (char*)malloc(3);
6161
if (!dest2)
6262
return;

0 commit comments

Comments
 (0)