From 0269a72336f210c1736efbf0916a41be4d808d5d Mon Sep 17 00:00:00 2001 From: Shailesh Mistry <shailesh.mistry@hotmail.co.uk> Date: Wed, 3 Oct 2018 17:47:06 +0100 Subject: [PATCH] Bug 697545 : Prevent SEGV after calling gs_image_class_1_simple. Prevent SEGV if memory allocation fails leading to penum being freed but then used again later. Error created using :- MEMENTO_FAILAT=20913 ./membin/gpcl6 -sDEVICE=pbmraw -dMaxBitmap=2000 -o /dev/null ./tests_private/pcl/pcl5cfts/fts.0100 --- base/gxifast.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/base/gxifast.c b/base/gxifast.c index 522fac2..8ab774f 100644 --- a/base/gxifast.c +++ b/base/gxifast.c @@ -110,9 +110,6 @@ gs_image_class_1_simple(gx_image_enum * penum) penum->line = gs_alloc_bytes(penum->memory, penum->line_size, "image line"); if (penum->line == 0) { - gx_default_end_image(penum->dev, - (gx_image_enum_common_t *) penum, - false); return 0; } #ifdef PACIFY_VALGRIND -- 2.9.1