Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
ImageMagick.29424
ImageMagick-CVE-2017-8356.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2017-8356.patch of Package ImageMagick.29424
diff --git a/coders/sun.c b/coders/sun.c index 8a1ff12..77d091e 100644 --- a/coders/sun.c +++ b/coders/sun.c @@ -366,17 +366,26 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); count=ReadBlob(image,image->colors,sun_colormap); if (count != (ssize_t) image->colors) - ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); + { + sun_colormap=(unsigned char *) RelinquishMagickMemory(sun_colormap); + ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); + } for (i=0; i < (ssize_t) image->colors; i++) image->colormap[i].red=ScaleCharToQuantum(sun_colormap[i]); count=ReadBlob(image,image->colors,sun_colormap); if (count != (ssize_t) image->colors) - ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); + { + sun_colormap=(unsigned char *) RelinquishMagickMemory(sun_colormap); + ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); + } for (i=0; i < (ssize_t) image->colors; i++) image->colormap[i].green=ScaleCharToQuantum(sun_colormap[i]); count=ReadBlob(image,image->colors,sun_colormap); if (count != (ssize_t) image->colors) - ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); + { + sun_colormap=(unsigned char *) RelinquishMagickMemory(sun_colormap); + ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); + } for (i=0; i < (ssize_t) image->colors; i++) image->colormap[i].blue=ScaleCharToQuantum(sun_colormap[i]); sun_colormap=(unsigned char *) RelinquishMagickMemory(sun_colormap); @@ -395,9 +404,9 @@ static Image *ReadSUNImage(const ImageInfo *image_info,ExceptionInfo *exception) if (sun_colormap == (unsigned char *) NULL) ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); count=ReadBlob(image,sun_info.maplength,sun_colormap); + sun_colormap=(unsigned char *) RelinquishMagickMemory(sun_colormap); if (count != (ssize_t) sun_info.maplength) ThrowReaderException(CorruptImageError,"UnexpectedEndOfFile"); - sun_colormap=(unsigned char *) RelinquishMagickMemory(sun_colormap); break; } default:
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor