summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2023-03-02 19:18:32 +0000
committerRobin Watts <Robin.Watts@artifex.com>2023-03-03 12:46:35 +0000
commit2c5dd537f71d9b617e50a43bcdb29b2ce3604118 (patch)
treedd72ede3ef351a624d759ed0dbf989f79c550e22 /base
parentf6a2ec7082e8e4798e3d62d466b29279ad89d57c (diff)
downloadghostpdl-2c5dd537f71d9b617e50a43bcdb29b2ce3604118.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.
Diffstat (limited to 'base')
-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)