Details
-
Bug
-
Resolution: Done
-
Major - P3
-
None
-
2.4.3
-
None
-
Fully Compatible
-
ALL
Description
FilteringClientCursor::FilteringClientCursor( auto_ptr<DBClientCursor> cursor , const BSONObj filter )
: _matcher( filter ) , _cursor( cursor ) , _pcmData( NULL ), _done( cursor.get() == 0 ) {
}
The order of calling copy constructor for _cursor and evaluation of the expression ( cursor.get() == 0 ) above is not guaranteed. The problem is that copy constructor for auto_ptr resets the original.