From: cristy Date: Sat, 2 May 2015 21:12:52 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~1076 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e4ec2a105a7ccde449a4de175ba5e1c6dd757d73;p=imagemagick --- diff --git a/MagickCore/blob.c b/MagickCore/blob.c index 8b9e6d366..c2a1b9028 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -125,6 +125,7 @@ struct _BlobInfo MagickBooleanType exempt, + immutable, synchronize, status, temporary; @@ -453,6 +454,7 @@ MagickExport BlobInfo *CloneBlobInfo(const BlobInfo *blob_info) clone_info->offset=blob_info->offset; clone_info->size=blob_info->size; clone_info->exempt=blob_info->exempt; + clone_info->immutable=blob_info->immutable; clone_info->status=blob_info->status; clone_info->temporary=blob_info->temporary; clone_info->type=blob_info->type; @@ -692,6 +694,7 @@ MagickExport void *DetachBlob(BlobInfo *blob_info) blob_info->offset=0; blob_info->eof=MagickFalse; blob_info->exempt=MagickFalse; + blob_info->immutable=MagickFalse; blob_info->type=UndefinedStream; blob_info->file_info.file=(FILE *) NULL; data=blob_info->data; @@ -2407,6 +2410,7 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info, { if (image_info->stream != (StreamHandler) NULL) image->blob->stream=(StreamHandler) image_info->stream; + image->immutable=MagickTrue; AttachBlob(image->blob,image_info->blob,image_info->length); return(MagickTrue); } @@ -3767,7 +3771,8 @@ MagickExport MagickOffsetType SeekBlob(Image *image, image->blob->eof=MagickFalse; break; } - if (image->blob->mapped != MagickFalse) + if ((image->blob->mapped != MagickFalse) && + (image->blob->immutable != MagickFalse)) { image->blob->eof=MagickTrue; return(-1);