Commit df41900
committed
Use Strcpy.qll in StrncpyFlippedArgs.ql
As a result, the query gets access to more types of strncpy-like
functions, as demonstrated by test.cpp, which now "fails" (i.e. works) for the new test
cases instroduced
in the previous commit.1 parent 554aea1 commit df41900
2 files changed
Lines changed: 8 additions & 32 deletions
File tree
- cpp/ql
- src/Likely Bugs/Memory Management
- test/query-tests/Likely Bugs/Memory Management/StrncpyFlippedArgs
Lines changed: 5 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | 45 | | |
72 | 46 | | |
73 | 47 | | |
| |||
96 | 70 | | |
97 | 71 | | |
98 | 72 | | |
99 | | - | |
| 73 | + | |
100 | 74 | | |
101 | 75 | | |
102 | 76 | | |
103 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
104 | 80 | | |
105 | 81 | | |
106 | 82 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | | - | |
| 105 | + | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
0 commit comments