From the manual page for isdigit(): "The argument to isdigit() must be EOF or representable as an unsigned char; otherwise, the result is undefined." The same applies to isalnum() etc. This matters for implementations which use "signed char" as char (as common on x86) because negative values (0x80..0xFF) will not be in the range of 0...UCHAR_MAX due to integer promotion rules. This yields typically either bogus results or crashes.
Created attachment 10489 [details] [review] Correct use of isdigit(), isalpha() etc.
Patch applied. Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.