Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
ImageMagick.18391
ImageMagick-CVE-2019-7397.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2019-7397.patch of Package ImageMagick.18391
Index: ImageMagick-6.8.8-1/coders/pdf.c =================================================================== --- ImageMagick-6.8.8-1.orig/coders/pdf.c 2019-02-11 16:20:46.713857928 +0100 +++ ImageMagick-6.8.8-1/coders/pdf.c 2019-02-11 17:13:31.529554520 +0100 @@ -1690,7 +1690,10 @@ RestoreMSCWarning offset=TellBlob(image); number_pixels=(MagickSizeType) image->columns*image->rows; if ((4*number_pixels) != (MagickSizeType) ((size_t) (4*number_pixels))) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); + } if ((compression == FaxCompression) || (compression == Group4Compression) || ((image_info->type != TrueColorType) && (IsGrayImage(image,&image->exception) != MagickFalse))) @@ -1713,7 +1716,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,image,"jpeg", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,image->exception.reason); + } break; } case JPEG2000Compression: @@ -1721,7 +1727,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,image,"jp2", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,image->exception.reason); + } break; } case RLECompression: @@ -1736,7 +1745,10 @@ RestoreMSCWarning length=(size_t) number_pixels; pixel_info=AcquireVirtualMemory(length,sizeof(*pixels)); if (pixel_info == (MemoryInfo *) NULL) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); + } pixels=(unsigned char *) GetVirtualMemoryBlob(pixel_info); /* Dump Runlength encoded pixels. @@ -1773,6 +1785,7 @@ RestoreMSCWarning pixel_info=RelinquishVirtualMemory(pixel_info); if (status == MagickFalse) { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); (void) CloseBlob(image); return(MagickFalse); } @@ -1819,7 +1832,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,image,"jpeg", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,image->exception.reason); + } break; } case JPEG2000Compression: @@ -1827,7 +1843,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,image,"jp2", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,image->exception.reason); + } break; } case RLECompression: @@ -1888,6 +1907,7 @@ RestoreMSCWarning pixel_info=RelinquishVirtualMemory(pixel_info); if (status == MagickFalse) { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); (void) CloseBlob(image); return(MagickFalse); } @@ -1988,6 +2008,7 @@ RestoreMSCWarning pixel_info=RelinquishVirtualMemory(pixel_info); if (status == MagickFalse) { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); (void) CloseBlob(image); return(MagickFalse); } @@ -2070,7 +2091,10 @@ RestoreMSCWarning tile_image=ThumbnailImage(image,geometry.width,geometry.height, &image->exception); if (tile_image == (Image *) NULL) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(ResourceLimitError,image->exception.reason); + } xref[object++]=TellBlob(image); (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double) object); @@ -2175,7 +2199,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,tile_image,"jpeg", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,tile_image->exception.reason); + } break; } case JPEG2000Compression: @@ -2183,7 +2210,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,tile_image,"jp2", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,tile_image->exception.reason); + } break; } case RLECompression: @@ -2200,6 +2230,7 @@ RestoreMSCWarning if (pixel_info == (MemoryInfo *) NULL) { tile_image=DestroyImage(tile_image); + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed"); } @@ -2233,6 +2264,7 @@ RestoreMSCWarning pixel_info=RelinquishVirtualMemory(pixel_info); if (status == MagickFalse) { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); (void) CloseBlob(image); return(MagickFalse); } @@ -2273,7 +2305,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,tile_image,"jpeg", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,tile_image->exception.reason); + } break; } case JPEG2000Compression: @@ -2281,7 +2316,10 @@ RestoreMSCWarning status=InjectImageBlob(image_info,image,tile_image,"jp2", &image->exception); if (status == MagickFalse) + { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(CoderError,tile_image->exception.reason); + } break; } case RLECompression: @@ -2299,6 +2337,7 @@ RestoreMSCWarning if (pixel_info == (MemoryInfo *) NULL) { tile_image=DestroyImage(tile_image); + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed"); } @@ -2336,6 +2375,7 @@ RestoreMSCWarning pixel_info=RelinquishVirtualMemory(pixel_info); if (status == MagickFalse) { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); (void) CloseBlob(image); return(MagickFalse); } @@ -2393,6 +2433,7 @@ RestoreMSCWarning if (pixel_info == (MemoryInfo *) NULL) { tile_image=DestroyImage(tile_image); + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed"); } @@ -2423,6 +2464,7 @@ RestoreMSCWarning pixel_info=RelinquishVirtualMemory(pixel_info); if (status == MagickFalse) { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); (void) CloseBlob(image); return(MagickFalse); } @@ -2598,6 +2640,7 @@ RestoreMSCWarning if (pixel_info == (MemoryInfo *) NULL) { image=DestroyImage(image); + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); ThrowWriterException(ResourceLimitError, "MemoryAllocationFailed"); } @@ -2629,6 +2672,7 @@ RestoreMSCWarning pixel_info=RelinquishVirtualMemory(pixel_info); if (status == MagickFalse) { + xref=(MagickOffsetType *) RelinquishMagickMemory(xref); (void) CloseBlob(image); return(MagickFalse); }
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