mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
C++: Accept test changes.
This commit is contained in:
@@ -4,14 +4,8 @@
|
||||
| tests.cpp:273:2:273:8 | call to sprintf | This 'call to sprintf' operation requires 9 bytes but the destination is only 8 bytes. |
|
||||
| tests.cpp:308:3:308:9 | call to sprintf | This 'call to sprintf' operation requires 9 bytes but the destination is only 8 bytes. |
|
||||
| tests.cpp:315:2:315:8 | call to sprintf | This 'call to sprintf' operation requires 11 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:316:2:316:8 | call to sprintf | This 'call to sprintf' operation requires 12 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:318:3:318:9 | call to sprintf | This 'call to sprintf' operation requires 11 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:316:2:316:8 | call to sprintf | This 'call to sprintf' operation requires 11 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:321:2:321:8 | call to sprintf | This 'call to sprintf' operation requires 11 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:324:3:324:9 | call to sprintf | This 'call to sprintf' operation requires 11 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:327:2:327:8 | call to sprintf | This 'call to sprintf' operation requires 12 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:329:3:329:9 | call to sprintf | This 'call to sprintf' operation requires 12 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:332:4:332:10 | call to sprintf | This 'call to sprintf' operation requires 12 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:336:2:336:8 | call to sprintf | This 'call to sprintf' operation requires 11 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:337:2:337:8 | call to sprintf | This 'call to sprintf' operation requires 12 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:338:2:338:8 | call to sprintf | This 'call to sprintf' operation requires 11 bytes but the destination is only 2 bytes. |
|
||||
| tests.cpp:339:2:339:8 | call to sprintf | This 'call to sprintf' operation requires 12 bytes but the destination is only 2 bytes. |
|
||||
|
||||
@@ -315,7 +315,7 @@ void test6(unsigned unsigned_value, int value) {
|
||||
sprintf(buffer, "%u", unsigned_value); // BAD: buffer overflow
|
||||
sprintf(buffer, "%d", unsigned_value); // BAD: buffer overflow
|
||||
if (unsigned_value < 10) {
|
||||
sprintf(buffer, "%u", unsigned_value); // GOOD [FALSE POSITIVE]
|
||||
sprintf(buffer, "%u", unsigned_value); // GOOD
|
||||
}
|
||||
|
||||
sprintf(buffer, "%u", -10); // BAD: buffer overflow
|
||||
@@ -329,12 +329,12 @@ void test6(unsigned unsigned_value, int value) {
|
||||
sprintf(buffer, "%d", value); // BAD: buffer overflow
|
||||
|
||||
if(value > 0) {
|
||||
sprintf(buffer, "%d", value); // GOOD [FALSE POSITIVE]
|
||||
sprintf(buffer, "%d", value); // GOOD
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(buffer, "%u", 0); // GOOD [FALSE POSITIVE]
|
||||
sprintf(buffer, "%d", 0); // GOOD [FALSE POSITIVE]
|
||||
sprintf(buffer, "%u", 5); // GOOD [FALSE POSITIVE]
|
||||
sprintf(buffer, "%d", 5); // GOOD [FALSE POSITIVE]
|
||||
sprintf(buffer, "%u", 0); // GOOD
|
||||
sprintf(buffer, "%d", 0); // GOOD
|
||||
sprintf(buffer, "%u", 5); // GOOD
|
||||
sprintf(buffer, "%d", 5); // GOOD
|
||||
}
|
||||
Reference in New Issue
Block a user