[gs-cvs] gs/src
Leonardo
leonardo at ghostscript.com
Tue Nov 15 05:27:19 PST 2005
Update of /cvs/ghostscript/gs/src
In directory casper2:/tmp/cvs-serv25561/gs/src
Modified Files:
gdevpdfg.c gdevpdti.c gdevpsft.c gxfcopy.c gxhldevc.c zchar1.c
ztrans.c
Log Message:
Fix : An unitialized data access.
DETAILS :
We detected sevral problems with running comparefiles with pdfwrite with
enabling floating point interrupts (patch IM866).
This patch fixes an unitialized data access, or inaccurate type casts.
These problems may relate to Bug 688379
"pdfwrite: an indeterministic behavior with Bug687660a.ps",
rather we could not get a proof for that
due to instability of the effect in the old code.
EXPECTED DIFFERENCES :
None.
Index: gdevpdfg.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevpdfg.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- gdevpdfg.c 12 Sep 2005 11:34:50 -0000 1.68
+++ gdevpdfg.c 15 Nov 2005 13:27:17 -0000 1.69
@@ -162,6 +162,7 @@
pvs->black_generation_id = (pis->black_generation != 0 ? pis->black_generation->id : 0);
pvs->undercolor_removal_id = (pis->undercolor_removal != 0 ? pis->undercolor_removal->id : 0);
pvs->overprint_mode = 0;
+ pvs->flatness = pis->flatness;
pvs->smoothness = pis->smoothness;
pvs->text_knockout = pis->text_knockout;
pvs->fill_overprint = false;
Index: gdevpdti.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevpdti.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- gdevpdti.c 14 Nov 2005 11:40:53 -0000 1.55
+++ gdevpdti.c 15 Nov 2005 13:27:17 -0000 1.56
@@ -671,8 +671,10 @@
cos_object_t *pco1 = (*ppcp)->object;
code = pco0->cos_procs->equal(pco0, pco1, pdev);
- if (code < 0)
+ if (code < 0) {
+ pdev->cgp = NULL;
return code;
+ }
if (code) {
*ppcp = pcp;
pdev->cgp = NULL;
Index: gdevpsft.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gdevpsft.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- gdevpsft.c 8 Dec 2004 21:35:13 -0000 1.35
+++ gdevpsft.c 15 Nov 2005 13:27:17 -0000 1.36
@@ -399,7 +399,7 @@
{
uint num_metrics = pmtx->numMetrics;
uint len = num_metrics * 4;
- double factor = pfont->data.unitsPerEm * (wmode ? -1 : 1);
+ double factor = (double)pfont->data.unitsPerEm * (wmode ? -1 : 1);
float sbw[4];
uint i;
Index: gxfcopy.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gxfcopy.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- gxfcopy.c 13 Nov 2005 17:42:07 -0000 1.56
+++ gxfcopy.c 15 Nov 2005 13:27:17 -0000 1.57
@@ -1544,6 +1544,8 @@
if (code < 0)
return code;
+ info->width[0].x = 0;
+ info->width[0].y = 0;
info->width[1].x = 0;
info->width[1].y = -finfo.BBox.q.x; /* Sic! */
info->v.x = finfo.BBox.q.x / 2;
Index: gxhldevc.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/gxhldevc.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- gxhldevc.c 31 May 2005 10:56:57 -0000 1.4
+++ gxhldevc.c 15 Nov 2005 13:27:17 -0000 1.5
@@ -90,7 +90,10 @@
psc->color_space_id = pcs->id;
pdevc->type->save_dc(pdevc, &(psc->saved_dev_color));
- i = any_abs(i);
+ if (pdevc->type == gx_dc_type_pattern2)
+ i = 0;
+ else if (i < 0)
+ i = -i - 1; /* See gx_num_components_Pattern. */
for (i--; i >= 0; i--)
psc->ccolor.paint.values[i] = pdevc->ccolor.paint.values[i];
Index: zchar1.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/zchar1.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- zchar1.c 14 Apr 2005 19:10:14 -0000 1.44
+++ zchar1.c 15 Nov 2005 13:27:17 -0000 1.45
@@ -1045,12 +1045,13 @@
switch (WMode) {
default:
code = zchar_get_metrics2((gs_font_base *)pfont1, pgref, wv);
- sbw[0] = wv[2];
- sbw[1] = wv[3];
- sbw[2] = wv[0];
- sbw[3] = wv[1];
- if (code)
+ if (code) {
+ sbw[0] = wv[2];
+ sbw[1] = wv[3];
+ sbw[2] = wv[0];
+ sbw[3] = wv[1];
break;
+ }
/* falls through */
case 0:
code = zchar_get_metrics((gs_font_base *)pfont1, pgref, sbw);
Index: ztrans.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/ztrans.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- ztrans.c 4 Oct 2005 06:30:02 -0000 1.28
+++ ztrans.c 15 Nov 2005 13:27:17 -0000 1.29
@@ -274,7 +274,7 @@
else if (code > 0)
params.Background_components = code;
if ((code = dict_floats_param(imemory, dop, "GrayBackground",
- 1, params.Background, NULL)) < 0
+ 1, ¶ms.GrayBackground, NULL)) < 0
)
return code;
if (dict_find_string(dop, "TransferFunction", &pparam) >0) {
More information about the gs-cvs
mailing list