Skip to content

Commit 5a38f81

Browse files
committed
C++: Accept test changes.
1 parent bbb9361 commit 5a38f81

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/ArithmeticUncontrolled.expected

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ edges
3535
| test.cpp:190:10:190:13 | call to rand | test.cpp:205:7:205:7 | y |
3636
| test.cpp:190:10:190:13 | call to rand | test.cpp:208:7:208:7 | y |
3737
| test.cpp:215:11:215:14 | call to rand | test.cpp:219:8:219:8 | x |
38-
| test.cpp:223:20:223:23 | call to rand | test.cpp:227:8:227:8 | x |
39-
| test.cpp:223:20:223:25 | (unsigned int)... | test.cpp:227:8:227:8 | x |
4038
nodes
4139
| test.c:18:13:18:16 | call to rand | semmle.label | call to rand |
4240
| test.c:21:17:21:17 | r | semmle.label | r |
@@ -92,9 +90,6 @@ nodes
9290
| test.cpp:208:7:208:7 | y | semmle.label | y |
9391
| test.cpp:215:11:215:14 | call to rand | semmle.label | call to rand |
9492
| test.cpp:219:8:219:8 | x | semmle.label | x |
95-
| test.cpp:223:20:223:23 | call to rand | semmle.label | call to rand |
96-
| test.cpp:223:20:223:25 | (unsigned int)... | semmle.label | (unsigned int)... |
97-
| test.cpp:227:8:227:8 | x | semmle.label | x |
9893
subpaths
9994
#select
10095
| test.c:21:17:21:17 | r | test.c:18:13:18:16 | call to rand | test.c:21:17:21:17 | r | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.c:18:13:18:16 | call to rand | Uncontrolled value |
@@ -125,5 +120,3 @@ subpaths
125120
| test.cpp:205:7:205:7 | y | test.cpp:190:10:190:13 | call to rand | test.cpp:205:7:205:7 | y | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:190:10:190:13 | call to rand | Uncontrolled value |
126121
| test.cpp:208:7:208:7 | y | test.cpp:190:10:190:13 | call to rand | test.cpp:208:7:208:7 | y | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:190:10:190:13 | call to rand | Uncontrolled value |
127122
| test.cpp:219:8:219:8 | x | test.cpp:215:11:215:14 | call to rand | test.cpp:219:8:219:8 | x | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:215:11:215:14 | call to rand | Uncontrolled value |
128-
| test.cpp:227:8:227:8 | x | test.cpp:223:20:223:23 | call to rand | test.cpp:227:8:227:8 | x | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:223:20:223:23 | call to rand | Uncontrolled value |
129-
| test.cpp:227:8:227:8 | x | test.cpp:223:20:223:25 | (unsigned int)... | test.cpp:227:8:227:8 | x | $@ flows to here and is used in arithmetic, potentially causing an overflow. | test.cpp:223:20:223:23 | call to rand | Uncontrolled value |

cpp/ql/test/query-tests/Security/CWE/CWE-190/semmle/ArithmeticUncontrolled/test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,6 @@ void test_mod_limit()
224224
unsigned int y = 100;
225225
unsigned int z;
226226

227-
z = (x + y) % 1000; // DUBIOUS (this could overflow but the result is controlled) [REPORTED]
227+
z = (x + y) % 1000; // DUBIOUS (this could overflow but the result is controlled)
228228
}
229229
}

0 commit comments

Comments
 (0)