diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-02-18 09:41:28 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-02-19 16:23:51 +0000 |
commit | 0db079cd5a09b3f24b0dd3563f100c77561ccfde (patch) | |
tree | d6442591b48800665087008e020ea08e53ee9d29 /sot | |
parent | 5bdd1e9ee8f3ca9dc647998a8ec7b9415add01fe (diff) |
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
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/stgelem.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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 |