/[packages]/updates/3/imagemagick/current/SOURCES/imagemagick-CVE-2014-8355.patch
ViewVC logotype

Diff of /updates/3/imagemagick/current/SOURCES/imagemagick-CVE-2014-8355.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 796946 by pterjan, Fri Nov 14 01:52:28 2014 UTC revision 796947 by luigiwalser, Fri Nov 14 03:11:38 2014 UTC
# Line 45  Line 45 
45  @@ -387,6 +389,9 @@ static Image *ReadPCXImage(const ImageIn  @@ -387,6 +389,9 @@ static Image *ReadPCXImage(const ImageIn
46       pcx_packets=(size_t) image->rows*pcx_info.bytes_per_line*       pcx_packets=(size_t) image->rows*pcx_info.bytes_per_line*
47         pcx_info.planes;         pcx_info.planes;
      pcx_pixels=(unsigned char *) AcquireQuantumMemory(pcx_packets,  
48  +    if ((size_t) (pcx_info.bits_per_pixel*pcx_info.planes*image->columns) >  +    if ((size_t) (pcx_info.bits_per_pixel*pcx_info.planes*image->columns) >
49  +        (pcx_packets*8U))  +        (pcx_packets*8U))
50  +      ThrowReaderException(CorruptImageError,"ImproperImageHeader");  +      ThrowReaderException(CorruptImageError,"ImproperImageHeader");
51         pcx_pixels=(unsigned char *) AcquireQuantumMemory(pcx_packets,
52         sizeof(*pcx_pixels));         sizeof(*pcx_pixels));
53       scanline=(unsigned char *) AcquireQuantumMemory(MagickMax(image->columns,       scanline=(unsigned char *) AcquireQuantumMemory(MagickMax(image->columns,
54         pcx_info.bytes_per_line),MagickMax(8,pcx_info.planes)*sizeof(*scanline));         pcx_info.bytes_per_line),MagickMax(8,pcx_info.planes)*sizeof(*scanline));

Legend:
Removed from v.796946  
changed lines
  Added in v.796947

  ViewVC Help
Powered by ViewVC 1.1.26