To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=94845
                 Issue #|94845
                 Summary|don't crash on bad binary files ...
               Component|utilities
                 Version|OOo 3.0
                Platform|All
                     URL|
              OS/Version|Linux
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|code
             Assigned to|mav
             Reported by|mmeeks





------- Additional comments from [EMAIL PROTECTED] Fri Oct 10 14:18:11 +0000 
2008 -------
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;

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to