Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
ImageMagick.18190
ImageMagick-CVE-2019-13454.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File ImageMagick-CVE-2019-13454.patch of Package ImageMagick.18190
Index: ImageMagick-6.8.8-1/magick/layer.c =================================================================== --- ImageMagick-6.8.8-1.orig/magick/layer.c 2019-07-22 17:01:56.574107416 +0200 +++ ImageMagick-6.8.8-1/magick/layer.c 2019-07-22 17:03:30.550654148 +0200 @@ -1634,45 +1634,47 @@ MagickExport void OptimizeImageTranspare % o exception: return any errors or warnings in this structure. % */ -MagickExport void RemoveDuplicateLayers(Image **images, - ExceptionInfo *exception) +MagickExport void RemoveDuplicateLayers(Image **images,ExceptionInfo *exception) { - register Image - *curr, - *next; - RectangleInfo bounds; + register Image + *image, + *next; + assert((*images) != (const Image *) NULL); assert((*images)->signature == MagickSignature); if ((*images)->debug != MagickFalse) - (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",(*images)->filename); + (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", + (*images)->filename); assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickSignature); - - curr=GetFirstImageInList(*images); - for (; (next=GetNextImageInList(curr)) != (Image *) NULL; curr=next) + image=GetFirstImageInList(*images); + for ( ; (next=GetNextImageInList(image)) != (Image *) NULL; image=next) { - if ( curr->columns != next->columns || curr->rows != next->rows - || curr->page.x != next->page.x || curr->page.y != next->page.y ) + if ((image->columns != next->columns) || (image->rows != next->rows) || + (image->page.x != next->page.x) || (image->page.y != next->page.y)) continue; - bounds=CompareImageBounds(curr,next,CompareAnyLayer,exception); - if ( bounds.x < 0 ) { - /* - the two images are the same, merge time delays and delete one. - */ - size_t time; - time = curr->delay*1000/curr->ticks_per_second; - time += next->delay*1000/next->ticks_per_second; - next->ticks_per_second = 100L; - next->delay = time*curr->ticks_per_second/1000; - next->iterations = curr->iterations; - *images = curr; - (void) DeleteImageFromList(images); - } + bounds=CompareImageBounds(image,next,CompareAnyLayer,exception); + if (bounds.x < 0) + { + /* + Two images are the same, merge time delays and delete one. + */ + size_t + time; + + time=1000*image->delay*PerceptibleReciprocal(image->ticks_per_second); + time+=1000*next->delay*PerceptibleReciprocal(next->ticks_per_second); + next->ticks_per_second=100L; + next->delay=time*image->ticks_per_second/1000; + next->iterations=image->iterations; + *images=image; + (void) DeleteImageFromList(images); + } } - *images = GetFirstImageInList(*images); + *images=GetFirstImageInList(*images); } /*
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