[Libreoffice-commits] core.git: vcl/qa vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Aug 13 01:16:34 PDT 2014
vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif |binary
vcl/source/filter/igif/decode.cxx | 11 ++++++----
2 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit ddc178e07d92bef3d0ca3cc6de5917d8ebe10dc9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Aug 13 09:12:26 2014 +0100
valgrind + bff: don't add 0xffff oldcode
Invalid read of size 1
at 0x9DC6247: GIFLZWDecompressor::AddToTable(unsigned short, unsigned short) (decode.cxx:117)
Change-Id: I9cea8dcd4a5eeaa1e793b9be96f82854b9d088af
diff --git a/vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif b/vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif
new file mode 100644
index 0000000..47f5d43
Binary files /dev/null and b/vcl/qa/cppunit/graphicfilter/data/gif/pass/sf_3e0068c9b19bb548826bed0599f65745-15940-minimized.gif differ
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index f53c005..85b417c 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -156,10 +156,13 @@ bool GIFLZWDecompressor::ProcessOneCode()
}
else if ( ( nCode > nEOICode ) && ( nCode <= nTableSize ) )
{
- if ( nCode == nTableSize )
- AddToTable( nOldCode, nOldCode );
- else
- AddToTable( nOldCode, nCode );
+ if ( nOldCode != 0xffff )
+ {
+ if ( nCode == nTableSize )
+ AddToTable( nOldCode, nOldCode );
+ else
+ AddToTable( nOldCode, nCode );
+ }
}
else
{
More information about the Libreoffice-commits
mailing list