[Libreoffice-commits] core.git: Branch 'libreoffice-4-3-1' - vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Aug 13 13:08:06 PDT 2014
vcl/source/filter/igif/decode.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 1fb8c4dbd504cbacf748ec4564370ba5250834c0
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)
Reviewed-on: https://gerrit.libreoffice.org/10905
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
(cherry picked from commit 5ae1557de992382ad945d61102326d5a61b6850a)
Change-Id: I9cea8dcd4a5eeaa1e793b9be96f82854b9d088af
Reviewed-on: https://gerrit.libreoffice.org/10911
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Reviewed-by: Eike Rathke <erack at redhat.com>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
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