File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
cpp/ql/test/library-tests/dataflow/taint-tests Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -65,4 +65,14 @@ void test_shared_field_member() {
65
65
std::unique_ptr<A> p = std::make_unique<A>(source (), 0 );
66
66
sink (p->x ); // $ MISSING: ast,ir
67
67
sink (p->y ); // not tainted
68
+ }
69
+
70
+ void getNumber (std::shared_ptr<int > ptr) {
71
+ *ptr = source ();
72
+ }
73
+
74
+ int test_from_issue_5190 () {
75
+ std::shared_ptr<int > p (new int );
76
+ getNumber (p);
77
+ sink (*p); // $ MISSING: ast,ir
68
78
}
Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ namespace std {
348
348
class shared_ptr {
349
349
public:
350
350
shared_ptr () noexcept ;
351
- explicit shared_ptr (T*);
351
+ explicit shared_ptr (T*); shared_ptr( const shared_ptr&) noexcept ;
352
352
template <class U > shared_ptr (const shared_ptr<U>&) noexcept ;
353
353
template <class U > shared_ptr (shared_ptr<U>&&) noexcept ;
354
354
You can’t perform that action at this time.
0 commit comments