hitoshura25/cvefixes huggingface dataset:
CVE-2017-9142 (C, published 2017-05-22T14:29Z)
Description: value: In ImageMagick 7.0.5-7 Q16, a crafted file could trigger an assertion failure in the WriteBlob function in MagickCore/blob.c because of missing checks in the ReadOneJNGImage function in coders/png.c.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-617 \u2014 Reachable Assertion
The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/png.c
Commit message: Fixed incorrect call to WriteBlob reported in #490.


Vulnerable code:
        (void) WriteBlob(color_image,length,chunk);

          chunk=(unsigned char *) RelinquishMagickMemory(chunk);

Fixed code:
          {
            (void) WriteBlob(color_image,length,chunk);
            chunk=(unsigned char *) RelinquishMagickMemory(chunk);
          }
CVE-2017-9143 (C, published 2017-05-22T14:29Z)
Description: value: In ImageMagick 7.0.5-5, the ReadARTImage function in coders/art.c allows attackers to cause a denial of service (memory leak) via a crafted .art file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/art.c
Commit message: Fixed memory leak reported in #456.


Vulnerable code:
      ThrowReaderException(CorruptImageError,"UnableToReadImageData");

Fixed code:
      {
        quantum_info=DestroyQuantumInfo(quantum_info);
        ThrowReaderException(CorruptImageError,"UnableToReadImageData");
      }
CVE-2017-9499 (C, published 2017-06-07T14:29Z)
Description: value: In ImageMagick 7.0.5-7 Q16, an assertion failure was found in the function SetPixelChannelAttributes, which allows attackers to cause a denial of service via a crafted file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-617 \u2014 Reachable Assertion
The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/mpc.c
Commit message: Added check for incorrect number of meta channels report in #492.


Vulnerable code:

Fixed code:
                    if (image->number_meta_channels > MaxPixelChannels)
                      ThrowReaderException(CorruptImageError,
                        "ImproperImageHeader");
CVE-2018-16323 (C, published 2018-09-01T18:29Z)
Description: value: ReadXBMImage in coders/xbm.c in ImageMagick before 7.0.8-9 leaves data uninitialized when processing an XBM file that has a negative pixel value. If the affected code is used as a library loaded into a process that includes sensitive information, that information sometimes can be leaked via the image data.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-200 \u2014 Exposure of Sensitive Information to an Unauthorized Actor
The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/xbm.c
Commit message: XBM coder leaves the hex image data uninitialized if hex value of the pixel is negative


Vulnerable code:
        break;
        break;

Fixed code:
        {
          data=(unsigned char *) RelinquishMagickMemory(data);
          ThrowReaderException(CorruptImageError,"ImproperImageHeader");
        }
        {
          data=(unsigned char *) RelinquishMagickMemory(data);
          ThrowReaderException(CorruptImageError,"ImproperImageHeader");
        }
CVE-2018-16640 (Other, published 2018-09-06T22:29Z)
Description: value: ImageMagick 7.0.8-5 has a memory leak vulnerability in the function ReadOneJNGImage in coders/png.c.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/png.c
configure
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1201


Vulnerable code:
          ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
            {
              DestroyJNG(chunk,&color_image,&color_image_info,
                &alpha_image,&alpha_image_info);

              ThrowReaderException(CorruptImageError,
                "NegativeOrZeroImageSize");
            }
# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-5.
PACKAGE_VERSION='7.0.8-5'
PACKAGE_STRING='ImageMagick 7.0.8-5'
\`configure' configures ImageMagick 7.0.8-5 to adapt to many kinds of systems.
     short | recursive ) echo "Configuration of ImageMagick 7.0.8-5:";;
ImageMagick configure 7.0.8-5
It was created by ImageMagick $as_me 7.0.8-5, which was
 VERSION='7.0.8-5'
MAGICK_PATCHLEVEL_VERSION=5
MAGICK_VERSION=7.0.8-5
MAGICK_GIT_REVISION=14506:0e75f0a50:20180703
This file was extended by ImageMagick $as_me 7.0.8-5, which was
ImageMagick config.status 7.0.8-5

Fixed code:
          {
            DestroyJNG(NULL,&color_image,&color_image_info,
              &alpha_image,&alpha_image_info);
            ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
          }
              {
                DestroyJNG(chunk,&color_image,&color_image_info,
                  &alpha_image,&alpha_image_info);
                ThrowReaderException(CorruptImageError,
                  "NegativeOrZeroImageSize");
              }
# Generated by GNU Autoconf 2.69 for ImageMagick 7.0.8-6.
PACKAGE_VERSION='7.0.8-6'
PACKAGE_STRING='ImageMagick 7.0.8-6'
\`configure' configures ImageMagick 7.0.8-6 to adapt to many kinds of systems.
     short | recursive ) echo "Configuration of ImageMagick 7.0.8-6:";;
ImageMagick configure 7.0.8-6
It was created by ImageMagick $as_me 7.0.8-6, which was
 VERSION='7.0.8-6'
MAGICK_PATCHLEVEL_VERSION=6
MAGICK_VERSION=7.0.8-6
MAGICK_GIT_REVISION=14516:c7537dd70:20180705
This file was extended by ImageMagick $as_me 7.0.8-6, which was
ImageMagick config.status 7.0.8-6
CVE-2018-16641 (C, published 2018-09-06T22:29Z)
Description: value: ImageMagick 7.0.8-6 has a memory leak vulnerability in the TIFFWritePhotoshopLayers function in coders/tiff.c.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-772 \u2014 Missing Release of Resource after Effective Lifetime
The product does not release a resource after its effective lifetime has ended, i.e., after the resource is no longer needed.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/tiff.c
Commit message: Fixed possible memory leak reported in #1206


Vulnerable code:

Fixed code:
      base_image=DestroyImage(base_image);
      base_image=DestroyImage(base_image);
      base_image=DestroyImage(base_image);
CVE-2018-16643 (C, published 2018-09-06T22:29Z)
Description: value: The functions ReadDCMImage in coders/dcm.c, ReadPWPImage in coders/pwp.c, ReadCALSImage in coders/cals.c, and ReadPICTImage in coders/pict.c in ImageMagick 7.0.8-4 do not check the return value of the fputc function, which allows remote attackers to cause a denial of service via a crafted image file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-252 \u2014 Unchecked Return Value
The product does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/cals.c
coders/dcm.c
coders/pict.c
coders/pwp.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1199


Vulnerable code:
    (void) fputc(c,file);
          else 
            else 
            (void) fputc(c,file);
        if (info.scale != (Quantum *) NULL) 
              (void) fputc(c,file);
      (void) fputc(c,file);

Fixed code:
    if (fputc(c,file) != c)
      break;
          else
            else
            if (fputc(c,file) != c)
              break;
        if (info.scale != (Quantum *) NULL)
              if (fputc(c,file) != c)
                break;
      if (fputc(c,file) != c)
        break;
CVE-2018-16644 (C, published 2018-09-06T22:29Z)
Description: value: There is a missing check for length in the functions ReadDCMImage of coders/dcm.c and ReadPICTImage of coders/pict.c in ImageMagick 7.0.8-11, which allows remote attackers to cause a denial of service via a crafted image.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/pict.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1269


Vulnerable code:

Fixed code:
            if (length > GetBlobSize(image))
              ThrowPICTException(CorruptImageError,
                "InsufficientImageDataInFile");
            if (length > GetBlobSize(image))
              ThrowPICTException(CorruptImageError,
                "InsufficientImageDataInFile");
            if (length > GetBlobSize(image))
              ThrowPICTException(CorruptImageError,
                "InsufficientImageDataInFile");
            if (length > GetBlobSize(image))
              ThrowPICTException(CorruptImageError,
                "InsufficientImageDataInFile");
                if (length > GetBlobSize(image))
                  ThrowPICTException(CorruptImageError,
                    "InsufficientImageDataInFile");
            if (length > GetBlobSize(image))
              ThrowPICTException(CorruptImageError,
                "InsufficientImageDataInFile");
        if (length > GetBlobSize(image))
          ThrowPICTException(CorruptImageError,
            "InsufficientImageDataInFile");
        if (length > GetBlobSize(image))
          ThrowPICTException(CorruptImageError,
            "InsufficientImageDataInFile");
        if (length > GetBlobSize(image))
          ThrowPICTException(CorruptImageError,
            "InsufficientImageDataInFile");
CVE-2018-16644 (C, published 2018-09-06T22:29Z)
Description: value: There is a missing check for length in the functions ReadDCMImage of coders/dcm.c and ReadPICTImage of coders/pict.c in ImageMagick 7.0.8-11, which allows remote attackers to cause a denial of service via a crafted image.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-119 \u2014 Improper Restriction of Operations within the Bounds of a Memory Buffer
The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations on unexpected memory locations that could be linked to other variables, data structures, or internal program data.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/dcm.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1269


Vulnerable code:

Fixed code:
          if (length > (size_t) GetBlobSize(image))
            ThrowDCMException(CorruptImageError,"InsufficientImageDataInFile");
CVE-2018-16645 (C, published 2018-09-06T22:29Z)
Description: value: There is an excessive memory allocation issue in the functions ReadBMPImage of coders/bmp.c and ReadDIBImage of coders/dib.c in ImageMagick 7.0.8-11, which allows remote attackers to cause a denial of service via a crafted image file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-770 \u2014 Allocation of Resources Without Limits or Throttling
The product allocates a reusable resource or group of resources on behalf of an actor without imposing any restrictions on the size or number of resources that can be allocated, in violation of the intended security policy for that actor.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/bmp.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1268


Vulnerable code:

Fixed code:
        if (bmp_info.number_colors > GetBlobSize(image))
          ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
CVE-2018-20467 (C, published 2018-12-26T03:29Z)
Description: value: In coders/bmp.c in ImageMagick before 7.0.8-16, an input file can result in an infinite loop and hang, with high CPU and memory consumption. Remote attackers could leverage this vulnerability to cause a denial of service via a crafted file.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-835 \u2014 Loop with Unreachable Exit Condition ('Infinite Loop')
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/bmp.c
Commit message: Prevent infinite loop


Vulnerable code:
        if (bmp_info.number_colors > GetBlobSize(image))
    if (bmp_info.ba_offset != 0)
      {
        offset=SeekBlob(image,(MagickOffsetType) bmp_info.ba_offset,SEEK_SET);
        if (offset < 0)
          ThrowReaderException(CorruptImageError,"ImproperImageHeader");
      }

Fixed code:
        if ((MagickSizeType) bmp_info.number_colors > GetBlobSize(image))
    offset=(MagickOffsetType) bmp_info.ba_offset;
    if (offset != 0)
      if ((offset < TellBlob(image)) ||
          (SeekBlob(image,offset,SEEK_SET) != offset))
        ThrowReaderException(CorruptImageError,"ImproperImageHeader");
CVE-2019-10131 (C, published 2019-04-30T19:29Z)
Description: value: An off-by-one read vulnerability was discovered in ImageMagick before version 7.0.7-28 in the formatIPTCfromBuffer function in coders/meta.c. A local attacker may use this flaw to read beyond the end of the buffer or to crash the program.
Severity: LOW (CVSS v3 base score: 7.1)
Weakness: CWE-193 \u2014 Off-by-one Error
A product calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/meta.c
Commit message: ...


Vulnerable code:
    str=(unsigned char *) AcquireQuantumMemory((size_t) count,sizeof(*str));

Fixed code:
    str=(unsigned char *) AcquireQuantumMemory((size_t) count+1,sizeof(*str));
CVE-2019-10714 (Other, published 2019-04-02T21:29Z)
Description: value: LocaleLowercase in MagickCore/locale.c in ImageMagick before 7.0.8-32 allows out-of-bounds access, leading to a SIGSEGV.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
ChangeLog
MagickCore/locale.c
Commit message: ...


Vulnerable code:

Fixed code:
2019-03-05  7.0.8-32 Cristy  <quetzlzacatenango@image...>
  * Release ImageMagick version 7.0.8-32, GIT revision ...

2019-03-05  7.0.8-32 Cristy  <quetzlzacatenango@image...>
  * Fix out-of-boundary LocaleLowerCase() @
    https://github.com/ImageMagick/ImageMagick/issues/1495

  if (c < 0)
    return(c);
  if (c < 0)
    return(c);
CVE-2019-10714 (C, published 2019-04-02T21:29Z)
Description: value: LocaleLowercase in MagickCore/locale.c in ImageMagick before 7.0.8-32 allows out-of-bounds access, leading to a SIGSEGV.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
MagickCore/locale.c
Commit message: ...


Vulnerable code:
  if (c < 0)
  if (c < 0)

Fixed code:
  if (c == EOF)
  if (c == EOF)
CVE-2019-10714 (C, published 2019-04-02T21:29Z)
Description: value: LocaleLowercase in MagickCore/locale.c in ImageMagick before 7.0.8-32 allows out-of-bounds access, leading to a SIGSEGV.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
MagickCore/locale.c
Commit message: ...


Vulnerable code:
    return(tolower_l(c,c_locale));
  return(tolower(c));
    return(toupper_l(c,c_locale));
  return(toupper(c));

Fixed code:
    return(tolower_l((int) ((unsigned char) c),c_locale));
  return(tolower((int) ((unsigned char) c)));
    return(toupper_l((int) ((unsigned char) c),c_locale));
  return(toupper((int) ((unsigned char) c)));
CVE-2019-11470 (C, published 2019-04-23T14:29Z)
Description: value: The cineon parsing component in ImageMagick 7.0.8-26 Q16 allows attackers to cause a denial-of-service (uncontrolled resource consumption) by crafting a Cineon image with an incorrect claimed image size. This occurs because ReadCINImage in coders/cin.c lacks a check for insufficient image data in a file.
Severity: HIGH (CVSS v3 base score: 6.5)
Weakness: CWE-400 \u2014 Uncontrolled Resource Consumption
The product does not properly control the allocation and maintenance of a limited resource, thereby enabling an actor to influence the amount of resources consumed, eventually leading to the exhaustion of available resources.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/cin.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1472


Vulnerable code:

Fixed code:
  if (((MagickSizeType) image->columns*image->rows) > GetBlobSize(image))
    ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile");
CVE-2019-13133 (C, published 2019-07-01T20:15Z)
Description: value: ImageMagick before 7.0.8-50 has a memory leak vulnerability in the function ReadBMPImage in coders/bmp.c.
Severity: MEDIUM (CVSS v3 base score: 5.5)
Weakness: CWE-401 \u2014 Missing Release of Memory after Effective Lifetime
The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/bmp.c
coders/viff.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1600


Vulnerable code:
            return((Image *) NULL);
            image=DestroyImageList(image);
            return((Image *) NULL);

Fixed code:
            break;
            status=MagickFalse;
            break;
CVE-2019-13134 (C, published 2019-07-01T20:15Z)
Description: value: ImageMagick before 7.0.8-50 has a memory leak vulnerability in the function ReadVIFFImage in coders/viff.c.
Severity: MEDIUM (CVSS v3 base score: 5.5)
Weakness: CWE-401 \u2014 Missing Release of Memory after Effective Lifetime
The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/bmp.c
coders/viff.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1600


Vulnerable code:
            return((Image *) NULL);
            image=DestroyImageList(image);
            return((Image *) NULL);

Fixed code:
            break;
            status=MagickFalse;
            break;
CVE-2019-13135 (C, published 2019-07-01T20:15Z)
Description: value: ImageMagick before 7.0.8-50 has a "use of uninitialized value" vulnerability in the function ReadCUTImage in coders/cut.c.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-908 \u2014 Use of Uninitialized Resource
The product uses or accesses a resource that has not been initialized.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/cut.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1599


Vulnerable code:

Fixed code:
  (void) memset(BImgBuff,0,(size_t) ldblk*sizeof(*BImgBuff));
CVE-2019-13136 (C, published 2019-07-01T20:15Z)
Description: value: ImageMagick before 7.0.8-50 has an integer overflow vulnerability in the function TIFFSeekCustomStream in coders/tiff.c.
Severity: MEDIUM (CVSS v3 base score: 7.8)
Weakness: CWE-190 \u2014 Integer Overflow or Wraparound
The product performs a calculation that can
         produce an integer overflow or wraparound when the logic
         assumes that the resulting value will always be larger than
         the original value. This occurs when an integer value is
         incremented to a value that is too large to store in the
         associated representation. When this occurs, the value may
         become a very small or negative number.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/tiff.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1602


Vulnerable code:

Fixed code:
      if (((offset > 0) && (profile->offset > (SSIZE_MAX-offset))) ||
          ((offset < 0) && (profile->offset < (-SSIZE_MAX-offset))))
        {
          errno=EOVERFLOW;
          return(-1);
        }
CVE-2019-13137 (C, published 2019-07-01T20:15Z)
Description: value: ImageMagick before 7.0.8-50 has a memory leak vulnerability in the function ReadPSImage in coders/ps.c.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-401 \u2014 Missing Release of Memory after Effective Lifetime
The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
coders/ps.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1601


Vulnerable code:

Fixed code:
          page_geometry=DestroyString(page_geometry);
CVE-2019-13295 (C, published 2019-07-05T01:15Z)
Description: value: ImageMagick 7.0.8-50 Q16 has a heap-based buffer over-read at MagickCore/threshold.c in AdaptiveThresholdImage because a width of zero is mishandled.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
MagickCore/threshold.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1608


Vulnerable code:

Fixed code:
  if (width == 0)
    return(threshold_image);
CVE-2019-13296 (C, published 2019-07-05T01:15Z)
Description: value: ImageMagick 7.0.8-50 Q16 has direct memory leaks in AcquireMagickMemory because of an error in CLIListOperatorImages in MagickWand/operation.c for a NULL value.
Severity: MEDIUM (CVSS v3 base score: 6.5)
Weakness: CWE-401 \u2014 Missing Release of Memory after Effective Lifetime
The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
MagickWand/operation.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1604


Vulnerable code:
            break;

Fixed code:
            { 
              image=DestroyImage(image);
              break;
            }
CVE-2019-13297 (C, published 2019-07-05T01:15Z)
Description: value: ImageMagick 7.0.8-50 Q16 has a heap-based buffer over-read at MagickCore/threshold.c in AdaptiveThresholdImage because a height of zero is mishandled.
Severity: MEDIUM (CVSS v3 base score: 8.8)
Weakness: CWE-125 \u2014 Out-of-bounds Read
The product reads data past the end, or before the beginning, of the intended buffer.
Repository: https://github.com/ImageMagick/ImageMagick
Files changed:
MagickCore/threshold.c
Commit message: https://github.com/ImageMagick/ImageMagick/issues/1609


Vulnerable code:
  if (width == 0)

Fixed code:
  if ((width == 0) || (height == 0))