components/ghostscript/patches/7103293.patch
author lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
Tue, 13 Mar 2012 18:45:25 +0530
branchs11-sru
changeset 2255 7185b36f1b55
permissions -rw-r--r--
7103293 Problem with print/ghostscript
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2255
7185b36f1b55 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
7185b36f1b55 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
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     3
@@ -750,6 +750,10 @@
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     4
 		return -1;
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     5
 	}
7185b36f1b55 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;
7185b36f1b55 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) {
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     8
+		jpc_cox_destroycompparms(compparms);
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
     9
+		return -1;
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    10
+	}	
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    11
 	if (prtflag) {
7185b36f1b55 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) {
7185b36f1b55 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)) {
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    14
@@ -1340,7 +1344,7 @@
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    15
 	jpc_crgcomp_t *comp;
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    16
 	uint_fast16_t compno;
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    17
 	crg->numcomps = cstate->numcomps;
7185b36f1b55 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)))) {
7185b36f1b55 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)))) {
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    20
 		return -1;
7185b36f1b55 7103293 Problem with print/ghostscript
lijo george - Sun Microsystems - Bangalore India <lijo.x.george@oracle.com>
parents:
diff changeset
    21
 	}
7185b36f1b55 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;