From: Cristy Date: Sun, 24 Jun 2018 20:26:06 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.8-4~17 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e87ab2c33b8483a1bfe77857f999db35f7aac42;p=imagemagick ... --- 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);