Issue 94845

Summary: don't crash on bad binary files ...
Product: utilities Reporter: mmeeks <mmeeks>
Component: codeAssignee: mikhail.voytenko
Status: CLOSED FIXED QA Contact: Unknown <non-migrated>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 3.0   
Target Milestone: OOo 3.0.1   
Hardware: All   
OS: Linux, all   
Issue Type: PATCH Latest Confirmation in: ---
Developer Difficulty: ---

Description mmeeks 2008-10-10 15:18:11 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;
Comment 1 mikhail.voytenko 2008-10-10 15:38:23 UTC
Thank you for the patch. I will integrate it in one of the next framework cwss.
Comment 2 mikhail.voytenko 2008-10-27 09:02:30 UTC
Integrated in cws fwk94.
Comment 3 mikhail.voytenko 2008-10-30 10:21:03 UTC
Development issue.
Comment 4 thorsten.ziehm 2009-07-20 15:59:40 UTC
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 =>
If you want to know more about the handling of fixed/verified issues =>