Commit c117a1e
authored
C++: demote
There were some false positives where something like
int x;
// ...
sprintf(buff, "%ld", (long)x);
was considered as if the parameter had a non-trivial range analysis only
because the range of `int` is smaller than the range for `long`, without
any non-trivial range analysis actually done on `x`.
These will now be reported by `OverrunWrite` instead.VeryLikelyOverrunWrite cast results1 parent 630982c commit c117a1e
File tree
3 files changed
+12
-8
lines changed- cpp/ql
- lib/semmle/code/cpp/commons
- test/query-tests/Security/CWE/CWE-242/semmle/tests
3 files changed
+12
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1197 | 1197 | | |
1198 | 1198 | | |
1199 | 1199 | | |
1200 | | - | |
1201 | | - | |
1202 | | - | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
| |||
1216 | 1216 | | |
1217 | 1217 | | |
1218 | 1218 | | |
| 1219 | + | |
| 1220 | + | |
1219 | 1221 | | |
1220 | 1222 | | |
1221 | 1223 | | |
| |||
1229 | 1231 | | |
1230 | 1232 | | |
1231 | 1233 | | |
1232 | | - | |
1233 | | - | |
1234 | | - | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
1235 | 1237 | | |
1236 | 1238 | | |
1237 | 1239 | | |
| |||
1241 | 1243 | | |
1242 | 1244 | | |
1243 | 1245 | | |
| 1246 | + | |
| 1247 | + | |
1244 | 1248 | | |
1245 | 1249 | | |
1246 | 1250 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | | - | |
0 commit comments