Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
ImageMagick.9293
ImageMagick-CVE-2017-14138.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2017-14138.patch of Package ImageMagick.9293
From cfc2bd4c87481d4cf60308cc6ffd3c61288ff004 Mon Sep 17 00:00:00 2001 From: Cristy <urban-warrior@imagemagick.org> Date: Wed, 2 Aug 2017 06:59:32 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/641 --- coders/webp.c | 112 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 55 insertions(+), 57 deletions(-) Index: ImageMagick-6.8.8-1/coders/webp.c =================================================================== --- ImageMagick-6.8.8-1.orig/coders/webp.c 2017-11-07 09:46:53.467022973 +0100 +++ ImageMagick-6.8.8-1/coders/webp.c 2017-11-07 11:23:52.538900455 +0100 @@ -203,6 +203,15 @@ static MagickBooleanType IsWEBPImageLoss static Image *ReadWEBPImage(const ImageInfo *image_info, ExceptionInfo *exception) { +#define ThrowWEBPException(severity,tag) \ +{ \ + if (stream != (unsigned char *) NULL) \ + stream=(unsigned char*) RelinquishMagickMemory(stream); \ + if (webp_image != (WebPDecBuffer *) NULL) \ + WebPFreeDecBuffer(webp_image); \ + ThrowReaderException(severity,tag); \ +} + Image *image; @@ -251,16 +260,17 @@ static Image *ReadWEBPImage(const ImageI image=DestroyImageList(image); return((Image *) NULL); } + stream=(unsigned char *) NULL; if (WebPInitDecoderConfig(&configure) == 0) - ThrowReaderException(ResourceLimitError,"UnableToDecodeImageFile"); + ThrowWEBPException(ResourceLimitError,"UnableToDecodeImageFile"); webp_image->colorspace=MODE_RGBA; length=(size_t) GetBlobSize(image); stream=(unsigned char *) AcquireQuantumMemory(length,sizeof(*stream)); if (stream == (unsigned char *) NULL) - ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); + ThrowWEBPException(ResourceLimitError,"MemoryAllocationFailed"); count=ReadBlob(image,length,stream); if (count != (ssize_t) length) - ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); + ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); webp_status=WebPGetFeatures(stream,length,features); if (webp_status == VP8_STATUS_OK) { @@ -285,26 +295,26 @@ static Image *ReadWEBPImage(const ImageI { case VP8_STATUS_OUT_OF_MEMORY: { - ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed"); + ThrowWEBPException(ResourceLimitError,"MemoryAllocationFailed"); break; } case VP8_STATUS_BITSTREAM_ERROR: { - ThrowReaderException(CorruptImageError,"CorruptImage"); + ThrowWEBPException(CorruptImageError,"CorruptImage"); break; } case VP8_STATUS_UNSUPPORTED_FEATURE: { - ThrowReaderException(CoderError,"DataEncodingSchemeIsNotSupported"); + ThrowWEBPException(CoderError,"DataEncodingSchemeIsNotSupported"); break; } case VP8_STATUS_NOT_ENOUGH_DATA: { - ThrowReaderException(CorruptImageError,"InsufficientImageDataInFile"); + ThrowWEBPException(CorruptImageError,"InsufficientImageDataInFile"); break; } default: - ThrowReaderException(CorruptImageError,"CorruptImage"); + ThrowWEBPException(CorruptImageError,"CorruptImage"); } } p=webp_image->u.RGBA.rgba;
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