From: Roland Illig Date: Sun, 18 Feb 2018 23:48:47 +0000 (+0100) Subject: Fix undefined behavior when calling isdigit (#989) X-Git-Tag: 7.0.7-23~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fede9f9dd52a6793042c8744cf6fbf6cafa8565f;p=imagemagick Fix undefined behavior when calling isdigit (#989) --- diff --git a/MagickCore/property.c b/MagickCore/property.c index 5ad1110b3..2841c0622 100644 --- a/MagickCore/property.c +++ b/MagickCore/property.c @@ -3396,7 +3396,7 @@ RestoreMSCWarning interpret_text=AcquireString(embed_text); /* new string with extra space */ extent=MagickPathExtent; /* allocated space in string */ number=MagickFalse; /* is last char a number? */ - for (q=interpret_text; *p!='\0'; number=isdigit(*p) ? MagickTrue : MagickFalse,p++) + for (q=interpret_text; *p!='\0'; number=isdigit((int) ((unsigned char) *p)) ? MagickTrue : MagickFalse,p++) { /* Look for the various escapes, (and handle other specials)