[Bug 1492885] Re: Practically-infinite loop in MagickCore/image.c - SetImageBackgroundColor

broucaries 1492885 at bugs.launchpad.net
Sun Mar 12 14:48:08 UTC 2017


** Bug watch added: github.com/ImageMagick/ImageMagick/issues #27
   https://github.com/ImageMagick/ImageMagick/issues/27

** Also affects: imagemagick via
   https://github.com/ImageMagick/ImageMagick/issues/27
   Importance: Unknown
       Status: Unknown

** Changed in: imagemagick (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to imagemagick in Ubuntu.
https://bugs.launchpad.net/bugs/1492885

Title:
  Practically-infinite loop in MagickCore/image.c -
  SetImageBackgroundColor

Status in ImageMagick:
  Unknown
Status in imagemagick package in Ubuntu:
  Fix Released

Bug description:
  SetImageBackgroundColor contains the following loop:

  for (y=0; y < (ssize_t) image->rows; y++)
    {
      register Quantum
        *restrict q;

      register ssize_t
        x;

      if (status == MagickFalse)
        continue;
      q=QueueCacheViewAuthenticPixels(image_view,0,y,image->columns,1,exception);
      if (q == (Quantum *) NULL)
        {
          status=MagickFalse;
          continue;
        }
      for (x=0; x < (ssize_t) image->columns; x++)
      {
        SetPixelViaPixelInfo(image,&background,q);
        q+=GetPixelChannels(image);
      }
      if (SyncCacheViewAuthenticPixels(image_view,exception) == MagickFalse)
        status=MagickFalse;
    }

  this means it can execute the inner loop 2^31 times for each valid
  row, for a potential maximum of 2^62 iterations.

To manage notifications about this bug go to:
https://bugs.launchpad.net/imagemagick/+bug/1492885/+subscriptions



More information about the foundations-bugs mailing list