summaryrefslogtreecommitdiff
path: root/pcl
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-02-17 09:30:25 +0000
committerRobin Watts <Robin.Watts@artifex.com>2022-02-17 11:26:06 +0000
commit88b3a4afbd307c534a6b94e25b85dfabedfb3e58 (patch)
treef2a5c4ce4ff55894615ec0731f7b6358fd56055e /pcl
parent37a42b40b097e48370c48f18c491050fb2149c48 (diff)
downloadghostpdl-88b3a4afbd307c534a6b94e25b85dfabedfb3e58.tar.gz
Coverity 375566: Init ref counting entry for gs_halftone (xps)
For the stack based halftone, we want to set the reference counting data to zeros/NULLs - in this case, it is later copied into an actually reference counted, heap allocated object. Equivalent to 6849cc4774817a2afa2e6f4d77c1aa63e432352f in pdf/ Coverity 375605: Init ref counting entry for gs_halftone For the stack based halftone, we want to set the reference counting data to zeros/NULLs - in this case, it is later copied into an actually reference counted, heap allocated object.
Diffstat (limited to 'pcl')
-rw-r--r--pcl/pl/plht.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pcl/pl/plht.c b/pcl/pl/plht.c
index 22a856dc4..487aa7133 100644
--- a/pcl/pl/plht.c
+++ b/pcl/pl/plht.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2021 Artifex Software, Inc.
+/* Copyright (C) 2001-2022 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -39,6 +39,7 @@ pl_set_pcl_halftone(gs_gstate * pgs, gs_mapping_proc transfer_proc,
code = gs_settransfer(pgs, transfer_proc);
if (code < 0)
return code;
+ memset(&ht.rc, 0x00, sizeof(ht.rc));
ht.type = ht_type_threshold;
ht.objtype = HT_OBJTYPE_DEFAULT;
ht.params.threshold.width = width;