Sanitize usage of <ctype.h> functions. It's important that characters

are passed zero-extended, not sign-extended [from HEAD].
PR: 2682
This commit is contained in:
Andy Polyakov
2012-01-12 16:28:03 +00:00
parent b7b4a9fa57
commit 9b2a29660b
5 changed files with 12 additions and 12 deletions

View File

@@ -1204,7 +1204,7 @@ int MAIN(int argc, char *argv[])
psk_key=*(++argv);
for (i=0; i<strlen(psk_key); i++)
{
if (isxdigit((int)psk_key[i]))
if (isxdigit((unsigned char)psk_key[i]))
continue;
BIO_printf(bio_err,"Not a hex number '%s'\n",*argv);
goto bad;