[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - filter/qa filter/source
Caolán McNamara
caolanm at redhat.com
Mon Jul 20 03:40:24 PDT 2015
filter/qa/cppunit/data/tiff/fail/hang-7.tiff |binary
filter/source/graphicfilter/itiff/ccidecom.cxx | 5 ++++-
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 4df53f3d14048492375b5b9bfe17cca4f9452c68
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Jul 20 11:20:45 2015 +0100
don't hang on a bad ReadCodeAndDecode
Change-Id: I999012d428fa84e21fe9e9f851a016eacc96a686
(cherry picked from commit 6964f67d0dd44c8a3c68caf194075ba5c649bf4b)
Reviewed-on: https://gerrit.libreoffice.org/17217
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/filter/qa/cppunit/data/tiff/fail/hang-7.tiff b/filter/qa/cppunit/data/tiff/fail/hang-7.tiff
new file mode 100644
index 0000000..61a5f2d
Binary files /dev/null and b/filter/qa/cppunit/data/tiff/fail/hang-7.tiff differ
diff --git a/filter/source/graphicfilter/itiff/ccidecom.cxx b/filter/source/graphicfilter/itiff/ccidecom.cxx
index c1447b16..5542cff 100644
--- a/filter/source/graphicfilter/itiff/ccidecom.cxx
+++ b/filter/source/graphicfilter/itiff/ccidecom.cxx
@@ -1026,11 +1026,14 @@ void CCIDecompressor::Read2DScanlineData(sal_uInt8 * pTarget, sal_uInt16 nTarget
while (nBitPos<nTargetBits && bStatus) {
n2DMode=ReadCodeAndDecode(p2DModeLookUp,10);
- if (!bStatus) return;
+ if (!bStatus)
+ return;
if (n2DMode==CCI2DMODE_UNCOMP) {
for (;;) {
nUncomp=ReadCodeAndDecode(pUncompLookUp,11);
+ if (!bStatus)
+ break;
if ( nUncomp <= CCIUNCOMP_4White_1Black ) {
nRun=nUncomp-CCIUNCOMP_0White_1Black;
FillBits(pTarget,nTargetBits,nBitPos,nRun,0x00);
More information about the Libreoffice-commits
mailing list