From 5e87ab2c33b8483a1bfe77857f999db35f7aac42 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 24 Jun 2018 16:26:06 -0400 Subject: [PATCH] ... --- coders/webp.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/coders/webp.c b/coders/webp.c index 3b57d450a..f09720d4d 100644 --- a/coders/webp.c +++ b/coders/webp.c @@ -393,8 +393,8 @@ static Image *ReadWEBPImage(const ImageInfo *image_info, webp_flags = 0; WebPData - content = { stream, length }, - chunk ={ 0 }; + chunk, + content = { stream, length }; WebPMux *mux; @@ -403,6 +403,7 @@ static Image *ReadWEBPImage(const ImageInfo *image_info, Extract any profiles. */ mux=WebPMuxCreate(&content,0); + (void) memset(&chunk,0,sizeof(chunk)); WebPMuxGetFeatures(mux,&webp_flags); if (webp_flags & ICCP_FLAG) { @@ -857,23 +858,23 @@ static MagickBooleanType WriteWEBPImage(const ImageInfo *image_info, Set image profiles (if any). */ mux_error=WEBP_MUX_OK; - chunk.size=0; + (void) memset(&chunk,0,sizeof(chunk)); mux=WebPMuxNew(); - profile=GetImageProfile(image,"ICC"); + profile=GetImageProfile(image,"ICC"); if ((profile != (StringInfo *) NULL) && (mux_error == WEBP_MUX_OK)) { chunk.bytes=GetStringInfoDatum(profile); chunk.size=GetStringInfoLength(profile); mux_error=WebPMuxSetChunk(mux,"ICCP",&chunk,0); } - profile=GetImageProfile(image,"EXIF"); + profile=GetImageProfile(image,"EXIF"); if ((profile != (StringInfo *) NULL) && (mux_error == WEBP_MUX_OK)) { chunk.bytes=GetStringInfoDatum(profile); chunk.size=GetStringInfoLength(profile); mux_error=WebPMuxSetChunk(mux,"EXIF",&chunk,0); } - profile=GetImageProfile(image,"XMP"); + profile=GetImageProfile(image,"XMP"); if ((profile != (StringInfo *) NULL) && (mux_error == WEBP_MUX_OK)) { chunk.bytes=GetStringInfoDatum(profile); -- 2.40.0