Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e96404

Browse files
author
Dave Bartolomeo
committed
Revert bad changes to basic_string
1 parent 35abcae commit 1e96404

2 files changed

Lines changed: 66 additions & 75 deletions

File tree

cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/stl.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,9 @@ namespace std
1616

1717
template<class charT, class traits = char_traits<charT>, class Allocator = allocator<charT> >
1818
class basic_string {
19-
private:
20-
const char* p;
21-
2219
public:
2320
explicit basic_string(const Allocator& a = Allocator());
24-
basic_string(const charT* s, const Allocator& a = Allocator()) :
25-
p(s)
26-
{
27-
}
21+
basic_string(const charT* s, const Allocator& a = Allocator());
2822

2923
const charT* c_str() const;
3024
};

cpp/ql/test/library-tests/dataflow/DefaultTaintTracking/tainted.expected

Lines changed: 65 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@
9090
| defaulttainttracking.cpp:88:18:88:23 | call to getenv | defaulttainttracking.cpp:88:8:88:32 | (reference dereference) |
9191
| defaulttainttracking.cpp:88:18:88:23 | call to getenv | defaulttainttracking.cpp:88:18:88:23 | call to getenv |
9292
| defaulttainttracking.cpp:88:18:88:23 | call to getenv | defaulttainttracking.cpp:88:18:88:30 | (reference to) |
93-
| defaulttainttracking.cpp:88:18:88:23 | call to getenv | defaulttainttracking.cpp:88:18:88:30 | temporary object |
9493
| defaulttainttracking.cpp:88:18:88:23 | call to getenv | shared.h:5:23:5:31 | sinkparam |
9594
| defaulttainttracking.cpp:97:27:97:32 | call to getenv | defaulttainttracking.cpp:91:42:91:44 | arg |
9695
| defaulttainttracking.cpp:97:27:97:32 | call to getenv | defaulttainttracking.cpp:92:12:92:14 | arg |
@@ -173,73 +172,71 @@
173172
| globals.cpp:13:15:13:20 | call to getenv | globals.cpp:13:15:13:20 | call to getenv |
174173
| globals.cpp:23:15:23:20 | call to getenv | globals.cpp:16:15:16:21 | global2 |
175174
| globals.cpp:23:15:23:20 | call to getenv | globals.cpp:23:15:23:20 | call to getenv |
176-
| stl.cpp:68:25:68:30 | call to getenv | shared.h:5:23:5:31 | sinkparam |
177-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:24:29:24:29 | s |
178-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:25:6:25:6 | s |
179-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:49:78:49:104 | (unnamed parameter 0) |
180-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:49:114:49:118 | (unnamed parameter 1) |
181-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:68:25:68:30 | call to getenv |
182-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:70:36:70:36 | s |
183-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:74:8:74:8 | a |
184-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:74:12:74:17 | call to source |
185-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:76:16:76:21 | call to source |
186-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:76:16:76:23 | (const char *)... |
187-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:76:16:76:24 | call to basic_string |
188-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:78:7:78:7 | (const char *)... |
189-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:78:7:78:7 | a |
190-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:88:16:88:21 | call to source |
191-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:88:16:88:23 | (const char *)... |
192-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:88:16:88:24 | call to basic_string |
193-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:91:6:91:6 | call to operator<< |
194-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:91:6:91:17 | (reference dereference) |
195-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:91:9:91:14 | call to source |
196-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:91:9:91:16 | (const char *)... |
197-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:92:15:92:15 | call to operator<< |
198-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:92:15:92:26 | (reference dereference) |
199-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:92:18:92:23 | call to source |
200-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:92:18:92:25 | (const char *)... |
201-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:93:6:93:6 | call to operator<< |
202-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:93:6:93:19 | (reference dereference) |
203-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:93:6:93:19 | (reference to) |
204-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:93:9:93:14 | call to source |
205-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:93:9:93:16 | (const char *)... |
206-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:93:18:93:18 | call to operator<< |
207-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:93:18:93:26 | (reference dereference) |
208-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:97:7:97:9 | (const stringstream)... |
209-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:97:7:97:9 | (reference to) |
210-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:97:7:97:9 | ss2 |
211-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:99:7:99:9 | (const stringstream)... |
212-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:99:7:99:9 | (reference to) |
213-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:99:7:99:9 | ss4 |
214-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:102:7:102:9 | (const basic_stringstream<char, char_traits<char>, allocator<char>>)... |
215-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:102:7:102:9 | ss2 |
216-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:104:7:104:9 | (const basic_stringstream<char, char_traits<char>, allocator<char>>)... |
217-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:104:7:104:9 | ss4 |
218-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:124:10:124:15 | call to source |
219-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:131:16:131:28 | call to basic_string |
220-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:131:17:131:26 | call to user_input |
221-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:131:17:131:28 | (const char *)... |
222-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:134:9:134:13 | path2 |
223-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:135:10:135:19 | call to user_input |
224-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:135:10:135:21 | (const char *)... |
225-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:135:10:135:21 | call to basic_string |
226-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:135:10:135:21 | temporary object |
227-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:136:7:136:11 | (const basic_string<char, char_traits<char>, allocator<char>>)... |
228-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:136:7:136:11 | path2 |
229-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:138:15:138:24 | call to user_input |
230-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:138:15:138:26 | (const char *)... |
231-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:138:15:138:27 | call to basic_string |
232-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:144:14:144:15 | cs |
233-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:144:19:144:24 | call to source |
234-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:144:19:144:26 | (const char *)... |
235-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:147:17:147:18 | cs |
236-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:147:17:147:19 | call to basic_string |
237-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:149:7:149:8 | cs |
238-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:155:14:155:15 | cs |
239-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:155:19:155:24 | call to source |
240-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:155:19:155:26 | (const char *)... |
241-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:158:17:158:18 | cs |
242-
| stl.cpp:68:25:68:30 | call to getenv | stl.cpp:158:17:158:19 | call to basic_string |
175+
| stl.cpp:62:25:62:30 | call to getenv | shared.h:5:23:5:31 | sinkparam |
176+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:21:29:21:29 | s |
177+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:43:78:43:104 | (unnamed parameter 0) |
178+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:43:114:43:118 | (unnamed parameter 1) |
179+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:62:25:62:30 | call to getenv |
180+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:64:36:64:36 | s |
181+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:68:8:68:8 | a |
182+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:68:12:68:17 | call to source |
183+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:70:16:70:21 | call to source |
184+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:70:16:70:23 | (const char *)... |
185+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:70:16:70:24 | call to basic_string |
186+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:72:7:72:7 | (const char *)... |
187+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:72:7:72:7 | a |
188+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:82:16:82:21 | call to source |
189+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:82:16:82:23 | (const char *)... |
190+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:82:16:82:24 | call to basic_string |
191+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:85:6:85:6 | call to operator<< |
192+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:85:6:85:17 | (reference dereference) |
193+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:85:9:85:14 | call to source |
194+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:85:9:85:16 | (const char *)... |
195+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:86:15:86:15 | call to operator<< |
196+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:86:15:86:26 | (reference dereference) |
197+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:86:18:86:23 | call to source |
198+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:86:18:86:25 | (const char *)... |
199+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:87:6:87:6 | call to operator<< |
200+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:87:6:87:19 | (reference dereference) |
201+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:87:6:87:19 | (reference to) |
202+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:87:9:87:14 | call to source |
203+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:87:9:87:16 | (const char *)... |
204+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:87:18:87:18 | call to operator<< |
205+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:87:18:87:26 | (reference dereference) |
206+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:91:7:91:9 | (const stringstream)... |
207+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:91:7:91:9 | (reference to) |
208+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:91:7:91:9 | ss2 |
209+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:93:7:93:9 | (const stringstream)... |
210+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:93:7:93:9 | (reference to) |
211+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:93:7:93:9 | ss4 |
212+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:96:7:96:9 | (const basic_stringstream<char, char_traits<char>, allocator<char>>)... |
213+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:96:7:96:9 | ss2 |
214+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:98:7:98:9 | (const basic_stringstream<char, char_traits<char>, allocator<char>>)... |
215+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:98:7:98:9 | ss4 |
216+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:118:10:118:15 | call to source |
217+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:125:16:125:28 | call to basic_string |
218+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:125:17:125:26 | call to user_input |
219+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:125:17:125:28 | (const char *)... |
220+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:128:9:128:13 | path2 |
221+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:129:10:129:19 | call to user_input |
222+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:129:10:129:21 | (const char *)... |
223+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:129:10:129:21 | call to basic_string |
224+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:130:7:130:11 | (const basic_string<char, char_traits<char>, allocator<char>>)... |
225+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:130:7:130:11 | path2 |
226+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:132:15:132:24 | call to user_input |
227+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:132:15:132:26 | (const char *)... |
228+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:132:15:132:27 | call to basic_string |
229+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:138:14:138:15 | cs |
230+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:138:19:138:24 | call to source |
231+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:138:19:138:26 | (const char *)... |
232+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:141:17:141:18 | cs |
233+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:141:17:141:19 | call to basic_string |
234+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:143:7:143:8 | cs |
235+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:149:14:149:15 | cs |
236+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:149:19:149:24 | call to source |
237+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:149:19:149:26 | (const char *)... |
238+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:152:17:152:18 | cs |
239+
| stl.cpp:62:25:62:30 | call to getenv | stl.cpp:152:17:152:19 | call to basic_string |
243240
| test_diff.cpp:92:10:92:13 | argv | shared.h:5:23:5:31 | sinkparam |
244241
| test_diff.cpp:92:10:92:13 | argv | test_diff.cpp:92:10:92:13 | argv |
245242
| test_diff.cpp:92:10:92:13 | argv | test_diff.cpp:92:10:92:16 | (const char *)... |

0 commit comments

Comments
 (0)