From 336bb38beecd94390af872fe9c16aa7693a97ac0 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 26 Dec 2017 11:59:35 -0500 Subject: [PATCH] ... --- MagickCore/blob.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/MagickCore/blob.c b/MagickCore/blob.c index e820c8b37..f6a7384e1 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -2710,12 +2710,19 @@ MagickExport MagickBooleanType IsBlobSeekable(const Image *image) blob_info=image->blob; switch (blob_info->type) { - case FileStream: case BlobStream: - case ZipStream: return(MagickTrue); - case UndefinedStream: case StandardStream: + case FileStream: + case ZipStream: + { + int + status; + + status=fseek(blob_info->file_info.file,0,SEEK_CUR); + return(status == -1 ? MagickFalse : MagickTrue); + } + case UndefinedStream: case BZipStream: case FifoStream: case PipeStream: @@ -3089,7 +3096,7 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info, if (strchr(type,'b') != (char *) NULL) setmode(fileno(blob_info->file_info.file),_O_BINARY); #endif - blob_info->type=StandardStream; + blob_info->type=FileStream; blob_info->exempt=MagickTrue; return(SetStreamBuffering(image_info,image)); } @@ -3105,7 +3112,7 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info, if (strchr(type,'b') != (char *) NULL) setmode(fileno(blob_info->file_info.file),_O_BINARY); #endif - blob_info->type=StandardStream; + blob_info->type=FileStream; blob_info->exempt=MagickTrue; return(SetStreamBuffering(image_info,image)); } -- 2.40.0