From 0db079cd5a09b3f24b0dd3563f100c77561ccfde Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 18 Feb 2013 09:41:28 +0000 Subject: coverity#982801 Out-of-bounds access surely given we stream this in on Load, we should stream it out on Store, rather than dump it out Change-Id: Ibf499dad8ebe6eb7a60cdbaf667d35eed8331685 --- sot/source/sdstor/stgelem.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sot') diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx index 86e4fb827ed6..48938f5604d9 100644 --- a/sot/source/sdstor/stgelem.cxx +++ b/sot/source/sdstor/stgelem.cxx @@ -157,8 +157,9 @@ sal_Bool StgHeader::Store( StgIo& rIo ) return sal_True; SvStream& r = *rIo.GetStrm(); r.Seek( 0L ); - r.Write( cSignature, 8 + 16 ); - r << nVersion // 1A version number + r.Write( cSignature, 8 ); + r << aClsId // 08 Class ID + << nVersion // 1A version number << nByteOrder // 1C Unicode byte order indicator << nPageSize // 1E 1 << nPageSize = block size << nDataPageSize // 20 1 << this size == data block size -- cgit