+2018-08-08 7.0.8-10 Cristy <quetzlzacatenango@image...>
+ * ThumbnailImage function no longer reveals sensitive information (reference
+ https://github.com/ImageMagick/ImageMagick/issues/1243).
+
2018-08-06 7.0.8-9 Cristy <quetzlzacatenango@image...>
* Release ImageMagick version 7.0.8-9, GIT revision 14618:a3663c3dc:20180805.
*/
static int XBMInteger(Image *image,short int *hex_digits)
-{
+{
int
c;
-
+
unsigned int
value;
-
+
/*
Skip any leading whitespace.
*/
do
- {
+ {
c=ReadBlobByte(image);
if (c == EOF)
return(-1);
*/
value=0;
do
- {
- if (value > (unsigned int) (INT_MAX/10))
- break;
- value*=16;
- c&=0xff;
- if (value > (unsigned int) (INT_MAX-hex_digits[c]))
- break;
- value+=hex_digits[c];
+ {
+ if (value <= (unsigned int) (INT_MAX/16))
+ {
+ value*=16;
+ c&=0xff;
+ if (value <= (unsigned int) (INT_MAX-hex_digits[c]))
+ value+=hex_digits[c];
+ }
c=ReadBlobByte(image);
if (c == EOF)
return(-1);