Commit 3f27cc726 for imagemagick.org
commit 3f27cc726038a42dea92cbd1e1550021292fe5e3
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sat Oct 17 19:38:34 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-v86v-4xf8-xjq4
diff --git a/coders/exr.c b/coders/exr.c
index f716ee732..adb1f33c0 100644
--- a/coders/exr.c
+++ b/coders/exr.c
@@ -285,15 +285,12 @@ static MagickBooleanType InitializeEXRChannels(Image *image,exr_context_t ctxt,
image->colorspace=GRAYColorspace;
*data=(uint8_t *) AcquireQuantumMemory(*pixel_size,pixel_count);
if (*data == (uint8_t*)NULL)
- {
- exr_decoding_destroy(ctxt, &decoder);
- ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
- image->filename);
- }
+ ThrowBinaryException(ResourceLimitError,"MemoryAllocationFailed",
+ image->filename);
memset(*data,0,*pixel_size*pixel_count);
p=*data;
channel=decoder.channels;
- for (c = 0; c < decoder.channel_count; ++c)
+ for (c=0; c < decoder.channel_count; c++)
{
channel->decode_to_ptr=p;
channel->user_pixel_stride=(int32_t) *pixel_size;