diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-07-13 00:49:10 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-07-13 10:25:32 +0100 |
commit | 3b7a12766361a1425566ea909e0003ec8c8ea73d (patch) | |
tree | 45c6cd1f4db04b0ff6b3a1dd0a32e0bd6d9fc07d /sot | |
parent | callcatcher: ByteString::CompareIgnoreCaseToAscii unused, shrink api (diff) | |
download | core-3b7a12766361a1425566ea909e0003ec8c8ea73d.tar.gz core-3b7a12766361a1425566ea909e0003ec8c8ea73d.zip |
init against short reads
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 67b033c4415b..dfc5024889a3 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -3266,7 +3266,7 @@ sal_Bool UCBStorage::IsStorageFile( SvStream* pFile ) return sal_False; pFile->Seek(0); - sal_uInt32 nBytes; + sal_uInt32 nBytes(0); *pFile >> nBytes; // search for the magic bytes @@ -3277,6 +3277,7 @@ sal_Bool UCBStorage::IsStorageFile( SvStream* pFile ) bRet = ( nBytes == 0x08074b50 ); if ( bRet ) { + nBytes = 0; *pFile >> nBytes; bRet = ( nBytes == 0x04034b50 ); } |