Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/927
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jan 4, 2018
1 parent a7414b7 commit 0272305
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coders/sixel.c
Expand Up @@ -999,7 +999,7 @@ static Image *ReadSIXELImage(const ImageInfo *image_info,ExceptionInfo *exceptio
Read SIXEL file.
*/
length=MagickPathExtent;
sixel_buffer=(char *) AcquireQuantumMemory((size_t) length,
sixel_buffer=(char *) AcquireQuantumMemory((size_t) length+MagickPathExtent,
sizeof(*sixel_buffer));
p=sixel_buffer;
if (sixel_buffer != (char *) NULL)
Expand All @@ -1021,6 +1021,7 @@ static Image *ReadSIXELImage(const ImageInfo *image_info,ExceptionInfo *exceptio
}
if (sixel_buffer == (char *) NULL)
ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
sixel_buffer[length]='\0';
/*
Decode SIXEL
*/
Expand Down

0 comments on commit 0272305

Please sign in to comment.