From 0897510362611886bfe296f8ab5d9aa1f82558cf Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 23 Jan 2018 09:04:29 -0500 Subject: [PATCH] Eliminate use of uninitialize value Credit OSS Fuzz --- ChangeLog | 3 +++ coders/txt.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8ee1001fe..f6914602c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2018-01-23 7.0.7-23 Cristy + * Fixed numerous memory leaks, credit to OSS Fuzz. + 2018-01-22 7.0.7-22 Cristy * Release ImageMagick version 7.0.0-22, GIT revision 22391:e8be814f1:20180122. diff --git a/coders/txt.c b/coders/txt.c index bd8989151..5b0f155ec 100644 --- a/coders/txt.c +++ b/coders/txt.c @@ -467,8 +467,8 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception) type=ParseCommandOption(MagickColorspaceOptions,MagickFalse,colorspace); if (type < 0) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); - (void) SetImageBackgroundColor(image,exception); (void) SetImageColorspace(image,(ColorspaceType) type,exception); + (void) SetImageBackgroundColor(image,exception); GetPixelInfo(image,&pixel); range=GetQuantumRange(image->depth); for (y=0; y < (ssize_t) image->rows; y++) -- 2.40.0