Skip to content

Commit f1c4fa2

Browse files
committed
C++: When we generate a string for the node we avoid multiple results by only using the 0'th result from the 'asExpr' predicate. However, when we want to convert between nodes and expressions we don't care about which one we get.
1 parent d2bb73b commit f1c4fa2

File tree

13 files changed

+8
-1135
lines changed

13 files changed

+8
-1135
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,10 @@ class Node extends TIRDataFlowNode {
414414
}
415415

416416
private string toExprString(Node n) {
417-
result = n.asExpr().toString()
417+
result = n.asExpr(0).toString()
418418
or
419-
result = n.asIndirectExpr().toString() + " indirection"
419+
not exists(n.asExpr()) and
420+
result = n.asIndirectExpr(0, 1).toString() + " indirection"
420421
}
421422

422423
/**
@@ -1506,15 +1507,15 @@ OperandNode operandNode(Operand operand) { result.getOperand() = operand }
15061507
* _out of_ an expression, like when an argument is passed by reference, use
15071508
* `definitionByReferenceNodeFromArgument` instead.
15081509
*/
1509-
ExprNode exprNode(Expr e) { result.getExpr() = e }
1510+
ExprNode exprNode(Expr e) { result.getExpr(_) = e }
15101511

15111512
/**
15121513
* Gets the `Node` corresponding to the value of evaluating `e`. Here, `e` may
15131514
* be a `Conversion`. For data flowing _out of_ an expression, like when an
15141515
* argument is passed by reference, use
15151516
* `definitionByReferenceNodeFromArgument` instead.
15161517
*/
1517-
ExprNode convertedExprNode(Expr e) { result.getConvertedExpr() = e }
1518+
ExprNode convertedExprNode(Expr e) { result.getConvertedExpr(_) = e }
15181519

15191520
/**
15201521
* Gets the `Node` corresponding to the value of `p` at function entry.

cpp/ql/test/library-tests/dataflow/dataflow-tests/dataflow-ir-consistency.expected

Lines changed: 0 additions & 291 deletions
Large diffs are not rendered by default.

cpp/ql/test/library-tests/dataflow/fields/dataflow-ir-consistency.expected

Lines changed: 0 additions & 279 deletions
Large diffs are not rendered by default.

cpp/ql/test/library-tests/dataflow/fields/ir-path-flow.expected

Lines changed: 0 additions & 347 deletions
Large diffs are not rendered by default.

cpp/ql/test/library-tests/dataflow/taint-tests/taint.expected

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,37 +8,21 @@ testFailures
88
| map.cpp:168:7:168:27 | ... = ... | Unexpected result: ir=168:20 |
99
| map.cpp:168:7:168:27 | ... = ... indirection | Unexpected result: ir=168:7 |
1010
| map.cpp:168:7:168:27 | ... = ... indirection | Unexpected result: ir=168:20 |
11-
| map.cpp:168:7:168:27 | call to source | Unexpected result: ir=168:7 |
12-
| map.cpp:168:7:168:27 | call to source | Unexpected result: ir=168:20 |
13-
| map.cpp:168:7:168:27 | call to source indirection | Unexpected result: ir=168:7 |
14-
| map.cpp:168:7:168:27 | call to source indirection | Unexpected result: ir=168:20 |
1511
| map.cpp:168:31:168:41 | // $ ast,ir | Missing result:ir= |
1612
| map.cpp:170:7:170:30 | ... = ... | Unexpected result: ir=170:7 |
1713
| map.cpp:170:7:170:30 | ... = ... | Unexpected result: ir=170:23 |
1814
| map.cpp:170:7:170:30 | ... = ... indirection | Unexpected result: ir=170:7 |
1915
| map.cpp:170:7:170:30 | ... = ... indirection | Unexpected result: ir=170:23 |
20-
| map.cpp:170:7:170:30 | call to source | Unexpected result: ir=170:7 |
21-
| map.cpp:170:7:170:30 | call to source | Unexpected result: ir=170:23 |
22-
| map.cpp:170:7:170:30 | call to source indirection | Unexpected result: ir=170:7 |
23-
| map.cpp:170:7:170:30 | call to source indirection | Unexpected result: ir=170:23 |
2416
| map.cpp:170:34:170:44 | // $ ast,ir | Missing result:ir= |
2517
| map.cpp:320:7:320:27 | ... = ... | Unexpected result: ir=320:7 |
2618
| map.cpp:320:7:320:27 | ... = ... | Unexpected result: ir=320:20 |
2719
| map.cpp:320:7:320:27 | ... = ... indirection | Unexpected result: ir=320:7 |
2820
| map.cpp:320:7:320:27 | ... = ... indirection | Unexpected result: ir=320:20 |
29-
| map.cpp:320:7:320:27 | call to source | Unexpected result: ir=320:7 |
30-
| map.cpp:320:7:320:27 | call to source | Unexpected result: ir=320:20 |
31-
| map.cpp:320:7:320:27 | call to source indirection | Unexpected result: ir=320:7 |
32-
| map.cpp:320:7:320:27 | call to source indirection | Unexpected result: ir=320:20 |
3321
| map.cpp:320:31:320:41 | // $ ast,ir | Missing result:ir= |
3422
| map.cpp:322:7:322:30 | ... = ... | Unexpected result: ir=322:7 |
3523
| map.cpp:322:7:322:30 | ... = ... | Unexpected result: ir=322:23 |
3624
| map.cpp:322:7:322:30 | ... = ... indirection | Unexpected result: ir=322:7 |
3725
| map.cpp:322:7:322:30 | ... = ... indirection | Unexpected result: ir=322:23 |
38-
| map.cpp:322:7:322:30 | call to source | Unexpected result: ir=322:7 |
39-
| map.cpp:322:7:322:30 | call to source | Unexpected result: ir=322:23 |
40-
| map.cpp:322:7:322:30 | call to source indirection | Unexpected result: ir=322:7 |
41-
| map.cpp:322:7:322:30 | call to source indirection | Unexpected result: ir=322:23 |
4226
| map.cpp:322:34:322:44 | // $ ast,ir | Missing result:ir= |
4327
| taint.cpp:16:8:16:14 | source1 | Unexpected result: ir=12:13 |
4428
| taint.cpp:16:8:16:14 | source1 | Unexpected result: ir=12:22 |

cpp/ql/test/query-tests/Critical/MemoryFreed/DoubleFree.expected

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ edges
99
| test_free.cpp:83:12:83:12 | a | test_free.cpp:85:12:85:12 | a |
1010
| test_free.cpp:101:10:101:10 | a | test_free.cpp:103:10:103:10 | a |
1111
| test_free.cpp:128:10:128:11 | * ... | test_free.cpp:129:10:129:11 | * ... |
12-
| test_free.cpp:128:10:128:11 | * ... | test_free.cpp:129:10:129:11 | a indirection |
13-
| test_free.cpp:128:10:128:11 | a indirection | test_free.cpp:129:10:129:11 | * ... |
14-
| test_free.cpp:128:10:128:11 | a indirection | test_free.cpp:129:10:129:11 | a indirection |
1512
| test_free.cpp:152:27:152:27 | a | test_free.cpp:154:10:154:10 | a |
1613
| test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a |
1714
| test_free.cpp:252:7:252:7 | p | test_free.cpp:255:10:255:10 | p |
@@ -36,13 +33,7 @@ nodes
3633
| test_free.cpp:101:10:101:10 | a | semmle.label | a |
3734
| test_free.cpp:103:10:103:10 | a | semmle.label | a |
3835
| test_free.cpp:128:10:128:11 | * ... | semmle.label | * ... |
39-
| test_free.cpp:128:10:128:11 | * ... | semmle.label | a indirection |
40-
| test_free.cpp:128:10:128:11 | a indirection | semmle.label | * ... |
41-
| test_free.cpp:128:10:128:11 | a indirection | semmle.label | a indirection |
4236
| test_free.cpp:129:10:129:11 | * ... | semmle.label | * ... |
43-
| test_free.cpp:129:10:129:11 | * ... | semmle.label | a indirection |
44-
| test_free.cpp:129:10:129:11 | a indirection | semmle.label | * ... |
45-
| test_free.cpp:129:10:129:11 | a indirection | semmle.label | a indirection |
4637
| test_free.cpp:152:27:152:27 | a | semmle.label | a |
4738
| test_free.cpp:154:10:154:10 | a | semmle.label | a |
4839
| test_free.cpp:207:10:207:10 | a | semmle.label | a |
@@ -63,13 +54,6 @@ subpaths
6354
| test_free.cpp:85:12:85:12 | a | test_free.cpp:83:12:83:12 | a | test_free.cpp:85:12:85:12 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:83:5:83:13 | delete | delete |
6455
| test_free.cpp:103:10:103:10 | a | test_free.cpp:101:10:101:10 | a | test_free.cpp:103:10:103:10 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:101:5:101:8 | call to free | call to free |
6556
| test_free.cpp:129:10:129:11 | * ... | test_free.cpp:128:10:128:11 | * ... | test_free.cpp:129:10:129:11 | * ... | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
66-
| test_free.cpp:129:10:129:11 | * ... | test_free.cpp:128:10:128:11 | * ... | test_free.cpp:129:10:129:11 | a indirection | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
67-
| test_free.cpp:129:10:129:11 | * ... | test_free.cpp:128:10:128:11 | a indirection | test_free.cpp:129:10:129:11 | * ... | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
68-
| test_free.cpp:129:10:129:11 | * ... | test_free.cpp:128:10:128:11 | a indirection | test_free.cpp:129:10:129:11 | a indirection | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
69-
| test_free.cpp:129:10:129:11 | a indirection | test_free.cpp:128:10:128:11 | * ... | test_free.cpp:129:10:129:11 | * ... | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
70-
| test_free.cpp:129:10:129:11 | a indirection | test_free.cpp:128:10:128:11 | * ... | test_free.cpp:129:10:129:11 | a indirection | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
71-
| test_free.cpp:129:10:129:11 | a indirection | test_free.cpp:128:10:128:11 | a indirection | test_free.cpp:129:10:129:11 | * ... | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
72-
| test_free.cpp:129:10:129:11 | a indirection | test_free.cpp:128:10:128:11 | a indirection | test_free.cpp:129:10:129:11 | a indirection | Memory pointed to by '* ...' may already have been freed by $@. | test_free.cpp:128:5:128:8 | call to free | call to free |
7357
| test_free.cpp:154:10:154:10 | a | test_free.cpp:152:27:152:27 | a | test_free.cpp:154:10:154:10 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:152:22:152:25 | call to free | call to free |
7458
| test_free.cpp:209:10:209:10 | a | test_free.cpp:207:10:207:10 | a | test_free.cpp:209:10:209:10 | a | Memory pointed to by 'a' may already have been freed by $@. | test_free.cpp:207:5:207:8 | call to free | call to free |
7559
| test_free.cpp:255:10:255:10 | p | test_free.cpp:252:7:252:7 | p | test_free.cpp:255:10:255:10 | p | Memory pointed to by 'p' may already have been freed by $@. | test_free.cpp:252:2:252:5 | call to free | call to free |

cpp/ql/test/query-tests/Critical/MemoryFreed/UseAfterFree.expected

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
edges
22
| test_free.cpp:11:10:11:10 | a | test_free.cpp:12:5:12:5 | a |
33
| test_free.cpp:11:10:11:10 | a | test_free.cpp:13:5:13:6 | * ... |
4-
| test_free.cpp:11:10:11:10 | a | test_free.cpp:13:5:13:6 | a |
54
| test_free.cpp:42:27:42:27 | a | test_free.cpp:45:5:45:5 | a |
65
| test_free.cpp:44:27:44:27 | a | test_free.cpp:45:5:45:5 | a |
76
| test_free.cpp:69:10:69:10 | a | test_free.cpp:71:9:71:9 | a |
@@ -19,9 +18,6 @@ nodes
1918
| test_free.cpp:11:10:11:10 | a | semmle.label | a |
2019
| test_free.cpp:12:5:12:5 | a | semmle.label | a |
2120
| test_free.cpp:13:5:13:6 | * ... | semmle.label | * ... |
22-
| test_free.cpp:13:5:13:6 | * ... | semmle.label | a |
23-
| test_free.cpp:13:5:13:6 | a | semmle.label | * ... |
24-
| test_free.cpp:13:5:13:6 | a | semmle.label | a |
2521
| test_free.cpp:42:27:42:27 | a | semmle.label | a |
2622
| test_free.cpp:44:27:44:27 | a | semmle.label | a |
2723
| test_free.cpp:45:5:45:5 | a | semmle.label | a |
@@ -52,9 +48,6 @@ subpaths
5248
#select
5349
| test_free.cpp:12:5:12:5 | a | test_free.cpp:11:10:11:10 | a | test_free.cpp:12:5:12:5 | a | Memory may have been previously freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
5450
| test_free.cpp:13:5:13:6 | * ... | test_free.cpp:11:10:11:10 | a | test_free.cpp:13:5:13:6 | * ... | Memory may have been previously freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
55-
| test_free.cpp:13:5:13:6 | * ... | test_free.cpp:11:10:11:10 | a | test_free.cpp:13:5:13:6 | a | Memory may have been previously freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
56-
| test_free.cpp:13:5:13:6 | a | test_free.cpp:11:10:11:10 | a | test_free.cpp:13:5:13:6 | * ... | Memory may have been previously freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
57-
| test_free.cpp:13:5:13:6 | a | test_free.cpp:11:10:11:10 | a | test_free.cpp:13:5:13:6 | a | Memory may have been previously freed by $@. | test_free.cpp:11:5:11:8 | call to free | call to free |
5851
| test_free.cpp:45:5:45:5 | a | test_free.cpp:42:27:42:27 | a | test_free.cpp:45:5:45:5 | a | Memory may have been previously freed by $@. | test_free.cpp:42:22:42:25 | call to free | call to free |
5952
| test_free.cpp:45:5:45:5 | a | test_free.cpp:44:27:44:27 | a | test_free.cpp:45:5:45:5 | a | Memory may have been previously freed by $@. | test_free.cpp:44:22:44:25 | call to free | call to free |
6053
| test_free.cpp:71:9:71:9 | a | test_free.cpp:69:10:69:10 | a | test_free.cpp:71:9:71:9 | a | Memory may have been previously freed by $@. | test_free.cpp:69:5:69:8 | call to free | call to free |

cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/argv/argvLocal.expected

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ edges
3939
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | * ... |
4040
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | * ... |
4141
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | * ... |
42-
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | i2 indirection |
43-
| argvLocal.c:105:14:105:17 | argv | argvLocal.c:111:15:111:17 | i2 indirection |
4442
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:116:9:116:10 | i3 |
4543
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:116:9:116:10 | i3 |
4644
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:116:9:116:10 | i3 |
@@ -65,8 +63,6 @@ edges
6563
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:135:9:135:12 | ... ++ |
6664
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:135:9:135:12 | ... ++ |
6765
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:135:9:135:12 | ... ++ |
68-
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:135:9:135:12 | i4 |
69-
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:135:9:135:12 | i4 |
7066
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:136:15:136:18 | -- ... |
7167
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:136:15:136:18 | -- ... |
7268
| argvLocal.c:115:13:115:16 | argv | argvLocal.c:136:15:136:18 | -- ... |
@@ -141,9 +137,6 @@ nodes
141137
| argvLocal.c:110:9:110:11 | * ... | semmle.label | * ... |
142138
| argvLocal.c:111:15:111:17 | * ... | semmle.label | * ... |
143139
| argvLocal.c:111:15:111:17 | * ... | semmle.label | * ... |
144-
| argvLocal.c:111:15:111:17 | * ... | semmle.label | i2 indirection |
145-
| argvLocal.c:111:15:111:17 | i2 indirection | semmle.label | * ... |
146-
| argvLocal.c:111:15:111:17 | i2 indirection | semmle.label | i2 indirection |
147140
| argvLocal.c:115:13:115:16 | argv | semmle.label | argv |
148141
| argvLocal.c:115:13:115:16 | argv | semmle.label | argv |
149142
| argvLocal.c:116:9:116:10 | i3 | semmle.label | i3 |
@@ -168,9 +161,6 @@ nodes
168161
| argvLocal.c:135:9:135:12 | ... ++ | semmle.label | ... ++ |
169162
| argvLocal.c:135:9:135:12 | ... ++ | semmle.label | ... ++ |
170163
| argvLocal.c:135:9:135:12 | ... ++ | semmle.label | ... ++ |
171-
| argvLocal.c:135:9:135:12 | ... ++ | semmle.label | i4 |
172-
| argvLocal.c:135:9:135:12 | i4 | semmle.label | ... ++ |
173-
| argvLocal.c:135:9:135:12 | i4 | semmle.label | i4 |
174164
| argvLocal.c:136:15:136:18 | -- ... | semmle.label | -- ... |
175165
| argvLocal.c:136:15:136:18 | -- ... | semmle.label | -- ... |
176166
| argvLocal.c:136:15:136:18 | -- ... | semmle.label | -- ... |

cpp/ql/test/query-tests/Security/CWE/CWE-134/semmle/funcs/funcsLocal.expected

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ edges
3737
| funcsLocal.c:46:7:46:9 | * ... | funcsLocal.c:47:9:47:11 | * ... |
3838
| funcsLocal.c:46:7:46:9 | gets output argument | funcsLocal.c:47:9:47:11 | * ... |
3939
| funcsLocal.c:46:7:46:9 | gets output argument | funcsLocal.c:47:9:47:11 | * ... |
40-
| funcsLocal.c:46:7:46:9 | i7 indirection | funcsLocal.c:47:9:47:11 | * ... |
41-
| funcsLocal.c:46:7:46:9 | i7 indirection | funcsLocal.c:47:9:47:11 | * ... |
4240
| funcsLocal.c:52:8:52:11 | call to gets | funcsLocal.c:53:9:53:11 | * ... |
4341
| funcsLocal.c:52:8:52:11 | call to gets | funcsLocal.c:53:9:53:11 | * ... |
4442
| funcsLocal.c:52:8:52:11 | call to gets | funcsLocal.c:53:9:53:11 | * ... |
@@ -70,10 +68,7 @@ nodes
7068
| funcsLocal.c:42:9:42:10 | i6 | semmle.label | i6 |
7169
| funcsLocal.c:46:7:46:9 | * ... | semmle.label | * ... |
7270
| funcsLocal.c:46:7:46:9 | * ... | semmle.label | * ... |
73-
| funcsLocal.c:46:7:46:9 | * ... | semmle.label | i7 indirection |
7471
| funcsLocal.c:46:7:46:9 | gets output argument | semmle.label | gets output argument |
75-
| funcsLocal.c:46:7:46:9 | i7 indirection | semmle.label | * ... |
76-
| funcsLocal.c:46:7:46:9 | i7 indirection | semmle.label | i7 indirection |
7772
| funcsLocal.c:47:9:47:11 | * ... | semmle.label | * ... |
7873
| funcsLocal.c:47:9:47:11 | * ... | semmle.label | * ... |
7974
| funcsLocal.c:52:8:52:11 | call to gets | semmle.label | call to gets |

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ edges
33
| test.cpp:39:27:39:30 | argv indirection | test.cpp:44:38:44:63 | ... * ... |
44
| test.cpp:39:27:39:30 | argv indirection | test.cpp:46:38:46:63 | ... + ... |
55
| test.cpp:39:27:39:30 | argv indirection | test.cpp:49:32:49:35 | size |
6-
| test.cpp:39:27:39:30 | argv indirection | test.cpp:50:17:50:30 | size |
6+
| test.cpp:39:27:39:30 | argv indirection | test.cpp:50:17:50:30 | new[] |
77
| test.cpp:39:27:39:30 | argv indirection | test.cpp:53:35:53:60 | ... * ... |
88
| test.cpp:124:18:124:23 | call to getenv | test.cpp:128:24:128:41 | ... * ... |
99
| test.cpp:124:18:124:31 | call to getenv indirection | test.cpp:128:24:128:41 | ... * ... |
@@ -40,7 +40,7 @@ nodes
4040
| test.cpp:44:38:44:63 | ... * ... | semmle.label | ... * ... |
4141
| test.cpp:46:38:46:63 | ... + ... | semmle.label | ... + ... |
4242
| test.cpp:49:32:49:35 | size | semmle.label | size |
43-
| test.cpp:50:17:50:30 | size | semmle.label | size |
43+
| test.cpp:50:17:50:30 | new[] | semmle.label | new[] |
4444
| test.cpp:53:35:53:60 | ... * ... | semmle.label | ... * ... |
4545
| test.cpp:124:18:124:23 | call to getenv | semmle.label | call to getenv |
4646
| test.cpp:124:18:124:31 | call to getenv indirection | semmle.label | call to getenv indirection |
@@ -82,7 +82,7 @@ subpaths
8282
| test.cpp:44:31:44:36 | call to malloc | test.cpp:39:27:39:30 | argv indirection | test.cpp:44:38:44:63 | ... * ... | This allocation size is derived from $@ and might overflow. | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) |
8383
| test.cpp:46:31:46:36 | call to malloc | test.cpp:39:27:39:30 | argv indirection | test.cpp:46:38:46:63 | ... + ... | This allocation size is derived from $@ and might overflow. | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) |
8484
| test.cpp:49:25:49:30 | call to malloc | test.cpp:39:27:39:30 | argv indirection | test.cpp:49:32:49:35 | size | This allocation size is derived from $@ and might overflow. | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) |
85-
| test.cpp:50:17:50:30 | new[] | test.cpp:39:27:39:30 | argv indirection | test.cpp:50:17:50:30 | size | This allocation size is derived from $@ and might overflow. | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) |
85+
| test.cpp:50:17:50:30 | new[] | test.cpp:39:27:39:30 | argv indirection | test.cpp:50:17:50:30 | new[] | This allocation size is derived from $@ and might overflow. | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) |
8686
| test.cpp:53:21:53:27 | call to realloc | test.cpp:39:27:39:30 | argv indirection | test.cpp:53:35:53:60 | ... * ... | This allocation size is derived from $@ and might overflow. | test.cpp:39:27:39:30 | argv indirection | user input (a command-line argument) |
8787
| test.cpp:128:17:128:22 | call to malloc | test.cpp:124:18:124:23 | call to getenv | test.cpp:128:24:128:41 | ... * ... | This allocation size is derived from $@ and might overflow. | test.cpp:124:18:124:23 | call to getenv | user input (an environment variable) |
8888
| test.cpp:128:17:128:22 | call to malloc | test.cpp:124:18:124:31 | call to getenv indirection | test.cpp:128:24:128:41 | ... * ... | This allocation size is derived from $@ and might overflow. | test.cpp:124:18:124:31 | call to getenv indirection | user input (an environment variable) |

0 commit comments

Comments
 (0)