summaryrefslogtreecommitdiff
path: root/print/ghostscript-gpl/patches/patch-CVE-2014-9029
diff options
context:
space:
mode:
Diffstat (limited to 'print/ghostscript-gpl/patches/patch-CVE-2014-9029')
-rw-r--r--print/ghostscript-gpl/patches/patch-CVE-2014-902935
1 files changed, 35 insertions, 0 deletions
diff --git a/print/ghostscript-gpl/patches/patch-CVE-2014-9029 b/print/ghostscript-gpl/patches/patch-CVE-2014-9029
new file mode 100644
index 00000000000..9c62690f41d
--- /dev/null
+++ b/print/ghostscript-gpl/patches/patch-CVE-2014-9029
@@ -0,0 +1,35 @@
+$NetBSD: patch-CVE-2014-9029,v 1.1 2014/12/30 07:52:41 dholland Exp $
+
+Patch for CVE-2014-9029 from https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2014-9029
+(adjusted very slightly to match the jasper shipped with ghostscript)
+
+
+--- jasper/src/libjasper/jpc/jpc_dec.c.orig 2012-08-08 08:01:36.000000000 +0000
++++ jasper/src/libjasper/jpc/jpc_dec.c
+@@ -1294,7 +1294,7 @@ static int jpc_dec_process_coc(jpc_dec_t
+ jpc_coc_t *coc = &ms->parms.coc;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, coc->compno) > dec->numcomps) {
++ if (JAS_CAST(int, coc->compno) >= dec->numcomps) {
+ jas_eprintf(
+ "invalid component number in COC marker segment\n");
+ return -1;
+@@ -1321,7 +1321,7 @@ static int jpc_dec_process_rgn(jpc_dec_t
+ jpc_rgn_t *rgn = &ms->parms.rgn;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, rgn->compno) > dec->numcomps) {
++ if (JAS_CAST(int, rgn->compno) >= dec->numcomps) {
+ jas_eprintf(
+ "invalid component number in RGN marker segment\n");
+ return -1;
+@@ -1371,7 +1371,7 @@ static int jpc_dec_process_qcc(jpc_dec_t
+ jpc_qcc_t *qcc = &ms->parms.qcc;
+ jpc_dec_tile_t *tile;
+
+- if (JAS_CAST(int, qcc->compno) > dec->numcomps) {
++ if (JAS_CAST(int, qcc->compno) >= dec->numcomps) {
+ jas_eprintf(
+ "invalid component number in QCC marker segment\n");
+ return -1;