components/ghostscript/patches/7103293.patch
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Wed, 29 Aug 2012 11:05:56 -0700
changeset 957 255465c5756f
parent 719 5ee16815b74c
permissions -rw-r--r--
Close of build 04.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
719
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     1
--- ghostscript-9.00/jasper/src/libjasper/jpc/jpc_cs.c.orig	Wed Dec 14 13:09:06 2011
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     2
+++ ghostscript-9.00/jasper/src/libjasper/jpc/jpc_cs.c	Wed Dec 14 13:09:20 2011
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     3
@@ -750,6 +750,10 @@
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     4
 		return -1;
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     5
 	}
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     6
 	compparms->numrlvls = compparms->numdlvls + 1;
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     7
+	if (compparms->numrlvls > JPC_MAXRLVLS) {
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     8
+		jpc_cox_destroycompparms(compparms);
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     9
+		return -1;
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    10
+	}	
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    11
 	if (prtflag) {
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    12
 		for (i = 0; i < compparms->numrlvls; ++i) {
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    13
 			if (jpc_getuint8(in, &tmp)) {
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    14
@@ -1340,7 +1344,7 @@
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    15
 	jpc_crgcomp_t *comp;
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    16
 	uint_fast16_t compno;
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    17
 	crg->numcomps = cstate->numcomps;
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    18
-	if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(uint_fast16_t)))) {
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    19
+	if (!(crg->comps = jas_malloc(cstate->numcomps * sizeof(jpc_crgcomp_t)))) {
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    20
 		return -1;
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    21
 	}
5ee16815b74c 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    22
 	for (compno = 0, comp = crg->comps; compno < cstate->numcomps;