Apache OpenOffice (AOO) Bugzilla – Issue 106575
box-base.cxx: use of erased data
Last modified: 2010-05-22 17:30:24 UTC
For source code file toolkit/source/layout/core/box-base.cxx, function Box_Base::removeChildData, is the following code for ( std::list< ChildData* >::iterator it = lst.begin(); it != lst.end(); it++ ) { if ( (*it)->mxChild == xChild ) { lst.erase( it ); return *it; } } It seems to be most unwise to return data after it has been erased. Suggest untested code like for ( std::list< ChildData* >::iterator it = lst.begin(); it != lst.end(); it++ ) { if ( (*it)->mxChild == xChild ) { ChildData * tmp = *it; lst.erase( it ); return tmp; } }
cmc->thb: Is this yours ?
Created attachment 65920 [details] Fix as patch
@dcb314: thx for the catch, fix added as a patch - @pl: any 3.2 fix cws I could piggy-back with this one? ;)
see also issue 106576 - BTW: you'll want to change lst to a reference instead of a by value list (or you can save the erase wholesale). As for a 3.2 CWS: if you get this on the stopper list, feel free to use ooo32gsl03 - which is going ready for QA tomorrow or so.
@pl: thx for the hint, indeed. Updating patch, missed the deadline apparently ...
Created attachment 65966 [details] updated patch
poke, this didn't get committed to anything right ?
I guess not, I'll put it into vcl110
committed in CWS vcl110
please verify in CWS vcl110, changeset at http://hg.services.openoffice.org/hg/cws/vcl110/rev/792efe9a6612
looks good I guess
integrated DEV300_m78