if (length != 0)
{
- chunk=(unsigned char *) AcquireQuantumMemory(length,sizeof(*chunk));
+ chunk=(unsigned char *) AcquireQuantumMemory(length+MagickPathExtent,
+ sizeof(*chunk));
if (chunk == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
if (length != 0)
{
- chunk=(unsigned char *) AcquireQuantumMemory(length,
- sizeof(*chunk));
+ chunk=(unsigned char *) AcquireQuantumMemory(length_
+ MagickPathExtent,sizeof(*chunk));
if (chunk == (unsigned char *) NULL)
ThrowReaderException(ResourceLimitError,