summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-01-22 15:14:08 +0100
committerMichael Stahl <mstahl@redhat.com>2016-01-25 20:44:38 +0000
commit290e8e787cc807297725dd41ce7f75817f159c26 (patch)
tree4efa647b162cae317b426d7471404d9961c2c8d8 /vcl
parent71e7c205d6219085bd856098228adbc73868dfd5 (diff)
absolute seek is clearer
Change-Id: Iec8ff121e630bc6f63f935af248edce4dd572428 (cherry picked from commit 4c241896ffab41da0cc1bcbf7e3401f205da28a1) Reviewed-on: https://gerrit.libreoffice.org/21787 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/dibtools.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx
index 59db04c7456d..030cf5792c73 100644
--- a/vcl/source/gdi/dibtools.cxx
+++ b/vcl/source/gdi/dibtools.cxx
@@ -832,8 +832,8 @@ bool ImplReadDIBBody( SvStream& rIStm, Bitmap& rBmp, Bitmap* pBmpAlpha, sal_uLon
aCodec.Read( rIStm, pData, nUncodedSize );
aCodec.EndCompression();
- // skip unread bytes from coded buffer
- rIStm.SeekRel( nCodedSize - ( rIStm.Tell() - nCodedPos ) );
+ // Seek behind the encoded block. There might have been bytes left or the codec might have read more than necessary.
+ rIStm.Seek(nCodedSize + nCodedPos);
// set decoded bytes to memory stream,
// from which we will read the bitmap data