Commit 6718f9c2b for imagemagick.org
commit 6718f9c2b08bfa9179bceefa4fbccfe831fd537e
Author: Cristy <urban-warrior@imagemagick.org>
Date: Fri Dec 4 18:45:22 2026 -0500
ReadNULLImage now returns NULL rather than an uninitialized canvas
diff --git a/coders/null.c b/coders/null.c
index 237ed382b..a56d7e5c8 100644
--- a/coders/null.c
+++ b/coders/null.c
@@ -63,8 +63,7 @@
Forward declarations.
*/
static MagickBooleanType
- WriteNULLImage(const ImageInfo *,Image *,ExceptionInfo *)
- magick_attribute((__pure__));
+ WriteNULLImage(const ImageInfo *,Image *,ExceptionInfo *);
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -140,14 +139,14 @@ static Image *ReadNULLImage(const ImageInfo *image_info,
{
q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
if (q == (Quantum *) NULL)
- break;
+ return(DestroyImageList(image));
for (x=0; x < (ssize_t) image->columns; x++)
{
SetPixelViaPixelInfo(image,&background,q);
q+=(ptrdiff_t) GetPixelChannels(image);
}
if (SyncAuthenticPixels(image,exception) == MagickFalse)
- break;
+ return(DestroyImageList(image));
}
return(GetFirstImageInList(image));
}