vcl/source/filter/igif/decode.cxx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
New commits: commit 1fb8c4dbd504cbacf748ec4564370ba5250834c0 Author: Caolán McNamara <caol...@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 <dtar...@redhat.com> Tested-by: David Tardon <dtar...@redhat.com> (cherry picked from commit 5ae1557de992382ad945d61102326d5a61b6850a) Change-Id: I9cea8dcd4a5eeaa1e793b9be96f82854b9d088af Reviewed-on: https://gerrit.libreoffice.org/10911 Reviewed-by: Michael Stahl <mst...@redhat.com> Reviewed-by: Eike Rathke <er...@redhat.com> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@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 {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits