2017-01-10 7.0.4-4 Cristy <quetzlzacatenango@image...>
* Recognize XML policy closing tags (reference
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31182).
+ * Fix memory leak in the MPC format.
2017-01-07 7.0.4-3 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.4-3, GIT revision 19329:930ca78:20170107.
#include "MagickCore/profile.h"
#include "MagickCore/property.h"
#include "MagickCore/quantum-private.h"
+#include "MagickCore/resource.h"
#include "MagickCore/static.h"
#include "MagickCore/statistic.h"
#include "MagickCore/string_.h"
/*
Create image colormap.
*/
- if (AcquireImageColormap(image,image->colors,exception) == MagickFalse)
+ image->colormap=(PixelInfo *) AcquireQuantumMemory(image->colors+1,
+ sizeof(*image->colormap));
+ if (image->colormap == (PixelInfo *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
if (image->colors != 0)
{
if ((image_info->ping != MagickFalse) && (image_info->number_scenes != 0))
if (image->scene >= (image_info->scene+image_info->number_scenes-1))
break;
- status=SetImageExtent(image,image->columns,image->rows,exception);
- if (status == MagickFalse)
- return(DestroyImageList(image));
+ if ((AcquireMagickResource(WidthResource,image->columns) == MagickFalse) ||
+ (AcquireMagickResource(HeightResource,image->rows) == MagickFalse))
+ ThrowReaderException(ImageError,"WidthOrHeightExceedsLimit");
/*
Attach persistent pixel cache.
*/