summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2023-03-02 19:18:32 +0000
committerChris Liddell <chris.liddell@artifex.com>2023-03-07 17:43:41 +0000
commite7367ea2279d65af2a6567aeb538ac90275de220 (patch)
tree39fc695866de765a88915d6f14cb8ddf3f35d99e
parent86d93e18b948977cebcaa114e500f135a25dafe7 (diff)
downloadghostpdl-e7367ea2279d65af2a6567aeb538ac90275de220.tar.gz
gdev_prn_size_buf_planar: Initialise mdev.
We create a device structure on the stack, and fill in just enough of it to be able to use existing code to return the size. Unfortunately, this produces valgrind warnings as some of the proc setup code trips over the device procs not all being zerod to start with. For the sake of valgrind, just clear the device when we create it. This is not something that happens often, so the speed hit should be negligible.
-rw-r--r--base/gdevppla.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/base/gdevppla.c b/base/gdevppla.c
index 93c6d5646..7ece491a1 100644
--- a/base/gdevppla.c
+++ b/base/gdevppla.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2021 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
@@ -122,7 +122,7 @@ gdev_prn_size_buf_planar(gx_device_buf_space_t *space, gx_device *target,
const gx_render_plane_t *render_plane,
int height, bool for_band)
{
- gx_device_memory mdev;
+ gx_device_memory mdev = { 0 };
int code;
if (render_plane && render_plane->index >= 0)