Skip to content

Commit fe355a0

Browse files
committed
C++: update test comments
1 parent 67fb48f commit fe355a0

File tree

1 file changed

+5
-5
lines changed
  • cpp/ql/test/query-tests/Security/CWE/CWE-120/semmle/tests

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ void tesHexBounds(int x) {
175175
char buffer3[3];
176176
char buffer5[5];
177177

178-
sprintf(buffer2, "%x", 1); // GOOD [FALSE POSITIVE]
179-
sprintf(buffer3, "%x", 16); // GOOD [FALSE POSITIVE]
180-
sprintf(buffer5, "%x", (unsigned short)x); // GOOD: bounded by conversion [FALSE POSITIVE]
178+
sprintf(buffer2, "%x", 1); // GOOD
179+
sprintf(buffer3, "%x", 16); // GOOD
180+
sprintf(buffer5, "%x", (unsigned short)x); // GOOD: bounded by conversion
181181
if (x < 16 && x > 0) {
182-
sprintf(buffer2, "%x", x); // GOOD: bounded by check [FALSE POSITIVE]
182+
sprintf(buffer2, "%x", x); // GOOD: bounded by check
183183
}
184184

185185
if (x < 16) {
@@ -190,6 +190,6 @@ void tesHexBounds(int x) {
190190
}
191191

192192
if(x < 0x10000 && x > 0) {
193-
sprintf(buffer5, "%x", x); // GOOD: bounded by check [FALSE POSITIVE]
193+
sprintf(buffer5, "%x", x); // GOOD: bounded by check
194194
}
195195
}

0 commit comments

Comments
 (0)