1
0
Fork 0

str(1): fixed integer overflow

This commit is contained in:
mars 2023-12-24 18:01:15 -07:00 committed by emma
parent e37c981d66
commit 2c716f1881
Signed by untrusted user: emma
GPG Key ID: 06FA419A1698C270
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ pass: for(argv += 2, r = 1; *argv != NULL; ++argv)
/* First checks if argv[0][i] is valid ASCII; ctypes(3)
* don't handle non-ASCII.
* This is bad. */
if(argv[0][i] < 0x80 && !ctypes[ctype].f(argv[0][i]))
if((unsigned char)argv[0][i] < 0x80 && !ctypes[ctype].f(argv[0][i]))
return 1;
else
r = 0;