From eb4a80e7ef2bbfddcb88a4ef0ec80fda90f54950 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Sat, 28 Apr 2018 15:44:28 +0200 Subject: [PATCH] Call SetImageBackgroundColor before we call MergeImageLayers (https://oss-fuzz.com/v2/testcase-detail/5123755102699520) --- coders/psd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/psd.c b/coders/psd.c index 1dcac026d..c587f47ce 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -2362,9 +2362,9 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception) profile=DestroyStringInfo(profile); ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); } - SetImageAlphaChannel(image,TransparentAlphaChannel,exception); image->background_color.alpha=TransparentAlpha; image->background_color.alpha_trait=BlendPixelTrait; + (void) SetImageBackgroundColor(image,exception); merged=MergeImageLayers(image,FlattenLayer,exception); ReplaceImageInList(&image,merged); } -- 2.40.0