From 6827e8f6613133d0e19f65bdfb1af4b5125da6c6 Mon Sep 17 00:00:00 2001 From: Michael Vrhel <michael.vrhel@artifex.com> Date: Thu, 29 Sep 2022 16:21:02 -0700 Subject: [PATCH 124/155] Bug 705938 seg fault with clist pattern The clist pattern many not have an icc_struct object so no need to check the spotnames in it. Have the pdf14 device deal with its devn_params appropriately if that occurs. --- base/gdevp14.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/base/gdevp14.c b/base/gdevp14.c index b99a3ffd1..2632b654e 100644 --- a/base/gdevp14.c +++ b/base/gdevp14.c @@ -11850,10 +11850,11 @@ c_pdf14trans_clist_read_update(gs_composite_t * pcte, gx_device * cdev, * use that for the number of components. Otherwise use * the page_spot_colors. The exception is, if we had used * the sICCOutputColors setting, then just use that, which - * should be already baked into num_comp + * should be already baked into num_comp. With clist patterns, + * cdev->icc_struct may be null. */ - if (cdev->icc_struct->spotnames == NULL) { + if (cdev->icc_struct == NULL || cdev->icc_struct->spotnames == NULL) { p14dev->devn_params.page_spot_colors = pclist_devn_params->page_spot_colors; if (num_comp < p14dev->devn_params.page_spot_colors + 4 ) { -- 2.30.4