File ImageMagick-CVE-2020-27764.patch of Package ImageMagick.25859
Index: ImageMagick-7.0.7-34/MagickCore/statistic.c
===================================================================
--- ImageMagick-7.0.7-34.orig/MagickCore/statistic.c 2020-12-04 14:37:51.997368439 +0100
+++ ImageMagick-7.0.7-34/MagickCore/statistic.c 2020-12-04 14:37:52.029368635 +0100
@@ -273,7 +273,7 @@ static double ApplyEvaluateOperator(Rand
}
case AndEvaluateOperator:
{
- result=(double) ((size_t) pixel & (size_t) (value+0.5));
+ result=(double) ((ssize_t) pixel & (ssize_t) (value+0.5));
break;
}
case CosineEvaluateOperator:
@@ -357,7 +357,7 @@ static double ApplyEvaluateOperator(Rand
}
case OrEvaluateOperator:
{
- result=(double) ((size_t) pixel | (size_t) (value+0.5));
+ result=(double) ((ssize_t) pixel | (ssize_t) (value+0.5));
break;
}
case PoissonNoiseEvaluateOperator:
@@ -428,7 +428,7 @@ static double ApplyEvaluateOperator(Rand
}
case XorEvaluateOperator:
{
- result=(double) ((size_t) pixel ^ (size_t) (value+0.5));
+ result=(double) ((ssize_t) pixel ^ (ssize_t) (value+0.5));
break;
}
}