Commit d8dc77345 for imagemagick.org
commit d8dc77345c76ec4d7b95da8ff4cc12e612b80ec8
Author: Dirk Lemstra <dirk@lemstra.org>
Date: Sun Jun 7 20:51:54 2026 +0200
Seek to the start of the blob if possible when opening a custom stream.
diff --git a/MagickCore/blob.c b/MagickCore/blob.c
index 778b85d05..3a1b8ae7b 100644
--- a/MagickCore/blob.c
+++ b/MagickCore/blob.c
@@ -3337,6 +3337,9 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info,
{
blob_info->type=CustomStream;
blob_info->custom_stream=image_info->custom_stream;
+ if (blob_info->custom_stream->seeker != (CustomStreamSeeker) NULL)
+ blob_info->custom_stream->seeker(0,SEEK_SET,
+ blob_info->custom_stream->data);
return(MagickTrue);
}
(void) DetachBlob(blob_info);