summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-01-29 15:25:44 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-01-29 15:25:44 +0000
commit54b5cc5cb04f3d93fceee796af8b164c8702c1fd (patch)
tree6e86e4b07f2f1d5610795c65fcacb61af7708a9f /sot
parent65d6a0f34518353d085bbf4e36de1e016e969790 (diff)
INTEGRATION: CWS fwk82_SRC680 (1.9.52); FILE MERGED
2008/01/09 10:38:20 mav 1.9.52.1: #152841# check the size
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgelem.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index 623d72247526..77c0b04eba43 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: stgelem.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: obo $ $Date: 2006-09-17 16:09:48 $
+ * last change: $Author: rt $ $Date: 2008-01-29 16:25:44 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -388,8 +388,11 @@ BOOL StgEntry::Load( const void* pFrom )
UINT16 n = nNameLen;
if( n )
n = ( n >> 1 ) - 1;
- if( n > 31 )
+ if( n > 31 || nSize < 0 )
+ {
+ // TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb
return FALSE;
+ }
aName = String( nName, n );
// I don't know the locale, so en_US is hopefully fine