From 54b5cc5cb04f3d93fceee796af8b164c8702c1fd Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Tue, 29 Jan 2008 15:25:44 +0000 Subject: INTEGRATION: CWS fwk82_SRC680 (1.9.52); FILE MERGED 2008/01/09 10:38:20 mav 1.9.52.1: #152841# check the size --- sot/source/sdstor/stgelem.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'sot/source/sdstor/stgelem.cxx') 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 -- cgit v1.2.3