From: cristy Date: Sat, 25 Jan 2014 23:59:50 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2789 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=752848ca3b6c0a36505b58e9751c1a5bdd656da0;p=imagemagick --- diff --git a/MagickCore/blob.c b/MagickCore/blob.c index cf6e8b49c..ba6741271 100644 --- a/MagickCore/blob.c +++ b/MagickCore/blob.c @@ -1536,8 +1536,8 @@ MagickExport unsigned char *ImageToBlob(const ImageInfo *image_info, Native blob support for this image format. */ blob_info->length=0; - blob_info->blob=(void *) AcquireQuantumMemory(MagickMaxBlobExtent, - sizeof(unsigned char)); + blob_info->blob=(void *) AcquireQuantumMemory(image->columns, + image->rows*sizeof(unsigned char)); if (blob_info->blob == (void *) NULL) (void) ThrowMagickException(exception,GetMagickModule(), ResourceLimitError,"MemoryAllocationFailed","`%s'",image->filename); @@ -1791,8 +1791,8 @@ MagickExport unsigned char *ImagesToBlob(const ImageInfo *image_info, Native blob support for this images format. */ blob_info->length=0; - blob_info->blob=(void *) AcquireQuantumMemory(MagickMaxBlobExtent, - sizeof(unsigned char)); + blob_info->blob=(void *) AcquireQuantumMemory(images->columns, + images->rows*sizeof(unsigned char)); if (blob_info->blob == (void *) NULL) (void) ThrowMagickException(exception,GetMagickModule(), ResourceLimitError,"MemoryAllocationFailed","`%s'",images->filename);