Apache OpenOffice (AOO) Bugzilla – Issue 94845
don't crash on bad binary files ...
Last modified: 2009-07-20 15:59:40 UTC
Index: source/sdstor/stgstrms.cxx =================================================================== RCS file: /cvs/util/sot/source/sdstor/stgstrms.cxx,v retrieving revision 1.11 diff -u -p -r1.11 stgstrms.cxx --- sot/source/sdstor/stgstrms.cxx +++ sot/source/sdstor/stgstrms.cxx @@ -823,6 +823,8 @@ void* StgDataStrm::GetPtr( INT32 Pos, BO INT32 StgDataStrm::Read( void* pBuf, INT32 n ) { + if (n < 0) + return 0; if( ( nPos + n ) > nSize ) n = nSize - nPos; INT32 nDone = 0;
Thank you for the patch. I will integrate it in one of the next framework cwss.
Integrated in cws fwk94.
Development issue.
This issue is closed automatically and wasn't rechecked in a current version of OOo. The fixed issue should be integrated in OOo since more than half a year. If you think this issue isn't fixed in a current version (OOo 3.1), please reopen it and change the field 'Target Milestone' accordingly. If you want to download a current version of OOo => http://download.openoffice.org/index.html If you want to know more about the handling of fixed/verified issues => http://wiki.services.openoffice.org/wiki/Handle_fixed_verified_issues