File ImageMagick-CVE-2020-27750.patch of Package ImageMagick.25859
diff --git a/MagickCore/colorspace-private.h b/MagickCore/colorspace-private.h
index b575a374ab..21d8e20e71 100644
--- a/MagickCore/colorspace-private.h
+++ b/MagickCore/colorspace-private.h
@@ -75,9 +75,9 @@ static inline void ConvertRGBToCMYK(PixelInfo *pixel)
black=magenta;
if (yellow < black)
black=yellow;
- cyan=(MagickRealType) ((cyan-black)/(1.0-black));
- magenta=(MagickRealType) ((magenta-black)/(1.0-black));
- yellow=(MagickRealType) ((yellow-black)/(1.0-black));
+ cyan=(MagickRealType) (PerceptibleReciprocal(1.0-black)*(cyan-black));
+ magenta=(MagickRealType) (PerceptibleReciprocal(1.0-black)*(magenta-black));
+ yellow=(MagickRealType) (PerceptibleReciprocal(1.0-black)*(yellow-black));
pixel->colorspace=CMYKColorspace;
pixel->red=QuantumRange*cyan;
pixel->green=QuantumRange*magenta;
diff --git a/MagickWand/pixel-iterator.c b/MagickWand/pixel-iterator.c
index 32e9496538..826d560158 100644
--- a/MagickWand/pixel-iterator.c
+++ b/MagickWand/pixel-iterator.c
@@ -918,12 +918,12 @@ WandExport MagickBooleanType PixelSyncIterator(PixelIterator *iterator)
MagickBooleanType
status;
+ register Quantum
+ *magick_restrict pixels;
+
register ssize_t
x;
- register Quantum
- *_magickcore_restrict pixels;
-
assert(iterator != (const PixelIterator *) NULL);
assert(iterator->signature == MagickWandSignature);
if (iterator->debug != MagickFalse)