9b24fb64e7
2 new upstream fixes OBS-URL: https://build.opensuse.org/request/show/506060 OBS-URL: https://build.opensuse.org/package/show/graphics/gifsicle?expand=0&rev=7
16 lines
633 B
Diff
16 lines
633 B
Diff
Set missing image data to 0, rather than leaving it uninitialized.
|
|
Avoid valgrind warnings.
|
|
|
|
diff --git a/src/gifread.c b/src/gifread.c
|
|
index d2021ee..e9a58dd 100644
|
|
--- a/src/gifread.c
|
|
+++ b/src/gifread.c
|
|
@@ -373,6 +373,7 @@ read_image_data(Gif_Context *gfc, Gif_Reader *grr)
|
|
sprintf(buf, "missing %ld %s of image data", delta,
|
|
delta == 1 ? "pixel" : "pixels");
|
|
gif_read_error(gfc, 1, buf);
|
|
+ memset(&gfc->image[gfc->decodepos], 0, delta);
|
|
} else if (delta < -1) {
|
|
/* One pixel of superfluous data is OK; that could be the
|
|
code == next_code case. */
|