From b503c46c124cf5aaa82a71e28f624f2ef2b71e71 Mon Sep 17 00:00:00 2001
From: ray <Ray.Johnston@artifex.com>
Date: Fri, 10 Apr 2020 15:35:02 -0700
Subject: [PATCH] Bug 702320: Valgrind complains about UMR.

The file for this bug does show that the stroke_color stack based struct
in not initialized. Init fill_color and stroke_color. This is probably a
bug tail from the fill_stroke commit.

Also explicitly set 'zeros' to 0 to clarify the expected contents.
---
 base/gxclbits.c | 3 +--
 base/gxclrast.c | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/base/gxclbits.c b/base/gxclbits.c
index 3c65af9..519cdac 100644
--- a/base/gxclbits.c
+++ b/base/gxclbits.c
@@ -82,7 +82,7 @@ go_process(stream_state * st, stream_cursor_read *pr, stream_cursor_write *pw, b
         return -1;
     return 0;
 }
-static byte zeros[1<<align_bitmap_mod];
+static byte zeros[1<<align_bitmap_mod] = { 0, };
 static int
 cmd_compress_bitmap(stream_state * st, const byte * data, uint width_bits,
                     uint raster, uint height, stream_cursor_write * pw)
@@ -110,7 +110,6 @@ cmd_compress_bitmap(stream_state * st, const byte * data, uint width_bits,
                 byte b = r.ptr[1] & mask;
                 r2.limit = &b;
                 r2.ptr = r2.limit-1;
-
                 status = go_process(st, &r2, pw, false);
                 if (status)
                     break;
diff --git a/base/gxclrast.c b/base/gxclrast.c
index 4d91fa4..4e75d3e 100644
--- a/base/gxclrast.c
+++ b/base/gxclrast.c
@@ -510,8 +510,8 @@ clist_playback_band(clist_playback_action playback_action,
     } clip_save;
     bool in_clip = false;
     gs_gstate gs_gstate;
-    gx_device_color fill_color;
-    gx_device_color stroke_color;
+    gx_device_color fill_color = { 0 };
+    gx_device_color stroke_color = { 0 };
     float dash_pattern[cmd_max_dash];
     gx_fill_params fill_params;
     gx_stroke_params stroke_params;
-- 
1.8.3.1

