Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
GraphicsMagick.8039
GraphicsMagick-CVE-2017-18022.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File GraphicsMagick-CVE-2017-18022.patch of Package GraphicsMagick.8039
Index: GraphicsMagick-1.3.25/magick/command.c =================================================================== --- GraphicsMagick-1.3.25.orig/magick/command.c 2016-09-05 21:20:24.000000000 +0200 +++ GraphicsMagick-1.3.25/magick/command.c 2018-01-09 12:29:00.938968161 +0100 @@ -8771,6 +8771,9 @@ static void LiberateArgumentList(const i int i; + if (argv == (char **) NULL) + return; + for (i=0; i< argc; i++) MagickFreeMemory(argv[i]); MagickFreeMemory(argv); @@ -13922,23 +13925,15 @@ static void MogrifyUsage(void) */ #define ThrowMontageException(code,reason,description) \ { \ - DestroyImageList(image); \ - DestroyImageList(image_list); \ - DestroyImageList(montage_image); \ - DestroyMontageInfo(montage_info); \ + status = MagickFail; \ ThrowException(exception,code,reason,description); \ - LiberateArgumentList(argc,argv); \ - return(False); \ + goto montage_cleanup_and_return; \ } #define ThrowMontageException3(code,reason,description) \ { \ - DestroyImageList(image); \ - DestroyImageList(image_list); \ - DestroyImageList(montage_image); \ - DestroyMontageInfo(montage_info); \ + status = MagickFail; \ ThrowException3(exception,code,reason,description); \ - LiberateArgumentList(argc,argv); \ - return(False); \ + goto montage_cleanup_and_return; \ } MagickExport unsigned int MontageImageCommand(ImageInfo *image_info, int argc,char **argv,char **metadata,ExceptionInfo *exception) @@ -13952,10 +13947,10 @@ MagickExport unsigned int MontageImageCo sans; Image - *image, - *image_list, - *montage_image, - *next_image; + *image = (Image *) NULL, + *image_list = (Image *) NULL, + *montage_image = (Image *) NULL, + *next_image = (Image *) NULL; long first_scene, @@ -13966,7 +13961,7 @@ MagickExport unsigned int MontageImageCo x; MontageInfo - *montage_info; + *montage_info = (MontageInfo *) NULL; QuantizeInfo quantize_info; @@ -15028,10 +15023,8 @@ MagickExport unsigned int MontageImageCo } if ((image == (Image *) NULL) && (image_list == (Image *) NULL)) { - if (exception->severity == UndefinedException) ThrowMontageException(OptionError,RequestDidNotReturnAnImage, (char *) NULL); - return(False); } if (i != (argc-1)) ThrowMontageException(OptionError,MissingAnImageFilename,(char *) NULL); @@ -15052,6 +15045,7 @@ MagickExport unsigned int MontageImageCo if (montage_image == (Image *) NULL) ThrowMontageException(OptionError,RequestDidNotReturnAnImage,(char *) NULL); DestroyImageList(image_list); + image_list=(Image *) NULL; /* Write image. */ @@ -15076,6 +15070,9 @@ MagickExport unsigned int MontageImageCo (void) ConcatenateString(&(*metadata),"\n"); MagickFreeMemory(text); } +montage_cleanup_and_return: + DestroyImageList(image); + DestroyImageList(image_list); DestroyImageList(montage_image); DestroyMontageInfo(montage_info); LiberateArgumentList(argc,argv);
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