Some isfoo(char) usages crept back into ftp

ok?

Philip Guenther


Index: ftp/fetch.c
===================================================================
RCS file: /cvs/src/usr.bin/ftp/fetch.c,v
retrieving revision 1.142
diff -u -p -r1.142 fetch.c
--- ftp/fetch.c 10 Sep 2015 13:43:35 -0000      1.142
+++ ftp/fetch.c 10 Oct 2015 23:30:52 -0000
@@ -1374,7 +1374,8 @@ urldecode(const char *str)
                /* Cannot use strtol here because next char
                 * after %xx may be a digit.
                 */
-               if (c == '%' && isxdigit(str[i+1]) && isxdigit(str[i+2])) {
+               if (c == '%' && isxdigit((unsigned char)str[i+1]) &&
+                   isxdigit((unsigned char)str[i+2])) {
                        *ret = hextochar(&str[i+1]);
                        i+=2;
                        continue;
@@ -1409,7 +1410,7 @@ recode_credentials(const char *userinfo)
 char
 hextochar(const char *str)
 {
-       char c, ret;
+       unsigned char c, ret;
 
        c = str[0];
        ret = c;

Reply via email to