Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/1615
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jun 22, 2019
1 parent d4fc44b commit 025e77f
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions MagickCore/statistic.c
Expand Up @@ -163,18 +163,17 @@ static PixelChannels **AcquirePixelThreadSet(const Image *images)

size_t
columns,
number_threads;
rows;

number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
pixels=(PixelChannels **) AcquireQuantumMemory(number_threads,
sizeof(*pixels));
rows=MagickMax(GetImageListLength(images),
(size_t) GetMagickResourceLimit(ThreadResource));
pixels=(PixelChannels **) AcquireQuantumMemory(rows,sizeof(*pixels));
if (pixels == (PixelChannels **) NULL)
return((PixelChannels **) NULL);
(void) memset(pixels,0,number_threads*sizeof(*pixels));
columns=images->columns;
columns=MaxPixelChannels;
for (next=images; next != (Image *) NULL; next=next->next)
columns=MagickMax(next->columns,columns);
for (i=0; i < (ssize_t) number_threads; i++)
for (i=0; i < (ssize_t) rows; i++)
{
register ssize_t
j;
Expand Down

0 comments on commit 025e77f

Please sign in to comment.