summaryrefslogtreecommitdiff
path: root/pxl
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2010-10-25 23:16:06 +0000
committerHenry Stiles <henry.stiles@artifex.com>2010-10-25 23:16:06 +0000
commit8e652fc17181b99f656f942bd6eb0145f71ba76c (patch)
tree17b6d1842bacc8cb162031be096f6f252efbf1ec /pxl
parent3b3122e401c3aa1545fc3c5dcd87274406cf3fe4 (diff)
Fix crash reported in bug #691717, gs_text_release() should not be
called if gs_text_process() returns an error. git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11852 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'pxl')
-rw-r--r--pxl/pxerrors.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pxl/pxerrors.c b/pxl/pxerrors.c
index 85d204a62..a95b9725a 100644
--- a/pxl/pxerrors.c
+++ b/pxl/pxerrors.c
@@ -270,10 +270,13 @@ px_error_page_show(const char *message, int ytop, px_state_t *pxs)
code = gs_text_process(penum);
if ( code > 0 )
code = gs_note_error(errorBadFontData); /* shouldn't happen! */
- gs_text_release(penum, "pxtext");
+ if ( code >= 0 )
+ gs_text_release(penum, "pxtext");
}
gs_scale(pgs, 1 / scale, 1 / scale);
y += point_size * 8 / 5;
+ if (code < 0)
+ break;
if ( !*p || !p[1] )
break;
}