From 6fe0131394fb029d2fccaee6b8edcb108840ad8a Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Wed, 18 Mar 2020 18:49:30 -0600 Subject: [PATCH] Initialize temporary buffers in general_composite_rect() Otherwise, Valgrind shows things like "conditional jump or move depends on uninitialised values" errors much later in calling code. For example, see https://gitlab.gnome.org/GNOME/librsvg/issues/572 Fixes https://gitlab.freedesktop.org/pixman/pixman/issues/9 --- pixman/pixman-general.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c index 7d74f98..7e5a0d0 100644 --- a/pixman/pixman-general.c +++ b/pixman/pixman-general.c @@ -165,6 +165,12 @@ general_composite_rect (pixman_implementation_t *imp, if (!scanline_buffer) return; + + memset (scanline_buffer, 0, width * Bpp * 3 + 15 * 3); + } + else + { + memset (stack_scanline_buffer, 0, sizeof (stack_scanline_buffer)); } src_buffer = ALIGN (scanline_buffer); -- 2.34.1