Changeset 39123 in vbox
- Timestamp:
- Oct 26, 2011 8:24:47 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r38999 r39123 6758 6758 /* attach launch data to the machine */ 6759 6759 Assert(mData->mSession.mPid == NIL_RTPROCESS); 6760 mData->mSession.mRemoteControls.push_back 6760 mData->mSession.mRemoteControls.push_back(aControl); 6761 6761 mData->mSession.mProgress = aProgress; 6762 6762 mData->mSession.mPid = pid; … … 9812 9812 setModified(IsModified_Storage); 9813 9813 mMediaData.backup(); 9814 9815 // we cannot use erase (it) below because backup() above will create9816 // a copy of the list and make this copy active, but the iterator9817 // still refers to the original and is not valid for the copy9818 9814 mMediaData->mAttachments.remove(pAttach); 9819 9815 … … 11612 11608 ComAssertMsgRet(found, ("The session is not found in the session list!"), 11613 11609 E_INVALIDARG); 11614 mData->mSession.mRemoteControls.remove(*it); 11610 // This MUST be erase(it), not remove(*it) as the latter triggers a 11611 // very nasty use after free due to the place where the value "lives". 11612 mData->mSession.mRemoteControls.erase(it); 11615 11613 } 11616 11614
Note:
See TracChangeset
for help on using the changeset viewer.