summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-12 10:56:48 +0100
committerAndras Timar <andras.timar@collabora.com>2015-08-06 12:56:13 +0200
commit1fb0028072c6efff05a033bea3a83d95ec75f496 (patch)
tree26220560e79e6be36b8e2a1206088c5901835821 /vcl
parent709e90407666898b3328387c9f9793c3a2a6db8f (diff)
fix another gif import crash
Change-Id: I0ffa569e0c4240e11184df7dd56b95d87a12425d (cherry picked from commit ee35b72064d8d1333709b102b051360018f8044b) Reviewed-on: https://gerrit.libreoffice.org/16961 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/qa/cppunit/graphicfilter/data/gif/pass/crash-2.gifbin0 -> 257 bytes
-rw-r--r--vcl/source/filter/igif/decode.cxx3
2 files changed, 3 insertions, 0 deletions
diff --git a/vcl/qa/cppunit/graphicfilter/data/gif/pass/crash-2.gif b/vcl/qa/cppunit/graphicfilter/data/gif/pass/crash-2.gif
new file mode 100644
index 000000000000..b7265f807d51
--- /dev/null
+++ b/vcl/qa/cppunit/graphicfilter/data/gif/pass/crash-2.gif
Binary files differ
diff --git a/vcl/source/filter/igif/decode.cxx b/vcl/source/filter/igif/decode.cxx
index 46a666f812ae..105eab94974d 100644
--- a/vcl/source/filter/igif/decode.cxx
+++ b/vcl/source/filter/igif/decode.cxx
@@ -193,6 +193,9 @@ bool GIFLZWDecompressor::ProcessOneCode()
nOldCode = nCode;
+ if (nCode > 4096)
+ return false;
+
// write character(/-sequence) of code nCode in the output buffer:
pE = pTable + nCode;
do