Skip to content

Commit 720ac02

Browse files
committed
C++: Add false positive.
1 parent 5489bb9 commit 720ac02

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

cpp/ql/test/query-tests/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean/UsingStrcpyAsBoolean.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@
2929
| test.cpp:135:14:135:40 | ... && ... | Return value of strcpy used in a logical operation. |
3030
| test.cpp:137:14:137:40 | ... == ... | Return value of strcpy used in a logical operation. |
3131
| test.cpp:139:14:139:40 | ... != ... | Return value of strcpy used in a logical operation. |
32+
| test.cpp:159:9:159:16 | call to strcpy_s | Return value of strcpy_s used directly in a conditional expression. |

cpp/ql/test/query-tests/Likely Bugs/Likely Typos/UsingStrcpyAsBoolean/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ void NegativeCases()
156156
{
157157
}
158158

159-
if (strcpy_s(szbuf1, 100, "test"))
159+
if (strcpy_s(szbuf1, 100, "test")) // [FALSE POSITIVE]
160160
{
161161
}
162162

0 commit comments

Comments
 (0)