diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-02-17 16:39:41 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2022-02-17 16:39:41 +0000 |
commit | 7e8849c0c78d565836c0a7a6104264f6d56f19dd (patch) | |
tree | 9c0aec37dbac97c0e74c97eb187decb5afbcb01b /pcl | |
parent | d2a362b30dadced457ed11e2151938df9ccbdd0f (diff) | |
download | ghostpdl-7e8849c0c78d565836c0a7a6104264f6d56f19dd.tar.gz |
Coverity 375568: Tweak initialisation of px_args_t.
Because args.pv[1] is non-zero, and all the rest are zero,
pxSetHalftoneMethod won't access args.source, but Coverity can't
see this.
For clarity, we update the init of args to clear the whole lot.
Diffstat (limited to 'pcl')
-rw-r--r-- | pcl/pxl/pxsessio.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pcl/pxl/pxsessio.c b/pcl/pxl/pxsessio.c index 25bce8b95..6448bcfd1 100644 --- a/pcl/pxl/pxsessio.c +++ b/pcl/pxl/pxsessio.c @@ -612,10 +612,9 @@ pxBeginPage(px_args_t * par, px_state_t * pxs) * Set the default halftone method. We have to do this here, * rather than earlier, so that the origin is set correctly. */ - px_args_t args; + px_args_t args = { 0 }; px_value_t device_matrix; - memset(args.pv, 0, sizeof(args.pv)); args.pv[1] = &device_matrix; /* DeviceMatrix */ device_matrix.type = pxd_scalar | pxd_ubyte; device_matrix.value.i = eDeviceBest; |