summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-03-30 22:22:26 +0200
committerMichael Stahl <mstahl@redhat.com>2014-03-30 22:41:48 +0200
commit1b40966fd0dd7e30c9fff40cc0dfcc15c3456221 (patch)
tree7faceb8e54e9c2545907e2ffe2e573bcc61ffa26 /sot
parent383c7a6913291af010e7e49f337de9b8450e8930 (diff)
sot: fix some bizarre resize code that creates 4G temp files on 32bit
StgTmpStrm::SetSize(): the nEndOfData - 1 may underflow if nEndOfData=0 which happened to be the same value of STREAM_SEEK_TO_END before but not any more; also it's a mystery to me why the last byte in the buffer would need to be overwritten with 0 here. This also fixes the failure of ww8_export test. Change-Id: Iefe5a22c667ee83fbc315d772f357b913105ad93
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgstrms.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 680daf26afbd..fcd196131761 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -1241,10 +1241,7 @@ void StgTmpStrm::SetSize(sal_uInt64 n)
{
if( n > nEndOfData )
{
- sal_uInt64 nCur = Tell();
- Seek( nEndOfData - 1 );
- WriteUChar( (sal_uInt8) 0 );
- Seek( nCur );
+ SvMemoryStream::SetSize(n);
}
else
nEndOfData = n;