summaryrefslogtreecommitdiff
path: root/print/mupdf/patches
diff options
context:
space:
mode:
authordrochner <drochner@pkgsrc.org>2011-01-31 17:44:30 +0000
committerdrochner <drochner@pkgsrc.org>2011-01-31 17:44:30 +0000
commit2168583e61d0aab6f0fdbfa7936265d629b059a3 (patch)
treeb18e9fc49a799b3051eb88a023a7dccf84136e88 /print/mupdf/patches
parent7fac3061ce78491b526adc0f91ebfd31890c8511 (diff)
downloadpkgsrc-2168583e61d0aab6f0fdbfa7936265d629b059a3.tar.gz
add patch from upstream to fix possible memory corruption due to
malformed JPEG images (SA43020)
Diffstat (limited to 'print/mupdf/patches')
-rw-r--r--print/mupdf/patches/patch-ad25
1 files changed, 25 insertions, 0 deletions
diff --git a/print/mupdf/patches/patch-ad b/print/mupdf/patches/patch-ad
new file mode 100644
index 00000000000..3efb4c59d3a
--- /dev/null
+++ b/print/mupdf/patches/patch-ad
@@ -0,0 +1,25 @@
+$NetBSD: patch-ad,v 1.1 2011/01/31 17:44:31 drochner Exp $
+
+http://secunia.com/advisories/43020/
+
+--- fitz/filt_dctd.c.orig 2010-08-25 14:12:11.000000000 +0000
++++ fitz/filt_dctd.c
+@@ -182,8 +182,18 @@ static void
+ closedctd(fz_stream *stm)
+ {
+ fz_dctd *state = stm->state;
++
++ if (setjmp(state->jb))
++ {
++ state->chain->rp = state->chain->wp - state->cinfo.src->bytes_in_buffer;
++ fz_warn("jpeg error: %s", state->msg);
++ goto skip;
++ }
++
+ if (state->init)
+ jpeg_finish_decompress(&state->cinfo);
++
++skip:
+ state->chain->rp = state->chain->wp - state->cinfo.src->bytes_in_buffer;
+ jpeg_destroy_decompress(&state->cinfo);
+ fz_free(state->scanline);