1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Make sure that only ascii is passed to isfoo functions.

This commit is contained in:
Werner Koch 2003-06-07 20:06:32 +00:00
parent a72b1e0a57
commit 6a00a17bd1
15 changed files with 66 additions and 31 deletions

View file

@ -569,7 +569,7 @@ classify_user_id2( const char *name,
memset (desc, 0, sizeof *desc);
*force_exact = 0;
/* skip leading spaces. Fixme: what is with trailing spaces? */
for(s = name; *s && isspace(*s); s++ )
for(s = name; *s && spacep (s); s++ )
;
switch (*s) {
@ -650,7 +650,7 @@ classify_user_id2( const char *name,
}
/* check if a hexadecimal number is terminated by EOS or blank */
if (hexlength && s[hexlength] && !isspace(s[hexlength])) {
if (hexlength && s[hexlength] && !spacep(s+hexlength)) {
if (hexprefix) /* a "0x" prefix without correct */
return 0; /* termination is an error */
else /* The first chars looked like */