diff options
author | Chris Liddell <chris.liddell@artifex.com> | 2023-01-31 10:16:45 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2023-02-10 09:32:04 +0000 |
commit | 936d966618c81fa125604fe76932f1d4f33df8e3 (patch) | |
tree | bddaeeb672d18eebc10cc0faa460c06f87245f0c /pcl | |
parent | 36add0c0844e69c8ab3befde784ca46874bc619e (diff) | |
download | ghostpdl-936d966618c81fa125604fe76932f1d4f33df8e3.tar.gz |
Bug 706360: Catch and act on error code during PCL5 init
Missing fonts is a fatal error, and we were ignoring the error from
pcl_do_resets() due to "missing" fonts (i.e. non-romfs configs not supported).
Diffstat (limited to 'pcl')
-rw-r--r-- | pcl/pcl/pctop.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pcl/pcl/pctop.c b/pcl/pcl/pctop.c index 224614d5d..38732d5e2 100644 --- a/pcl/pcl/pctop.c +++ b/pcl/pcl/pctop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2022 Artifex Software, Inc. +/* Copyright (C) 2001-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -281,8 +281,11 @@ pcl_impl_allocate_interp_instance(pl_interp_implementation_t *impl, /* Return success */ impl->interp_client_data = pcli; /* Initial reset for the PCL interpreter */ - pcl_do_resets(&pcli->pcs, pcl_reset_initial); - return 0; + code = pcl_do_resets(&pcli->pcs, pcl_reset_initial); + if (code < 0) { + (void)impl->proc_deallocate_interp_instance(impl); + } + return code; } /* if the device option string PCL is not given, the default |