File tree Expand file tree Collapse file tree
cpp/ql/test/library-tests/dataflow/taint-tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,4 +65,14 @@ void test_shared_field_member() {
6565 std::unique_ptr<A> p = std::make_unique<A>(source (), 0 );
6666 sink (p->x ); // $ MISSING: ast,ir
6767 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
6878}
Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ namespace std {
348348 class shared_ptr {
349349 public:
350350 shared_ptr () noexcept ;
351- explicit shared_ptr (T*);
351+ explicit shared_ptr (T*); shared_ptr( const shared_ptr&) noexcept ;
352352 template <class U > shared_ptr (const shared_ptr<U>&) noexcept ;
353353 template <class U > shared_ptr (shared_ptr<U>&&) noexcept ;
354354
You can’t perform that action at this time.
0 commit comments