summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2015-10-13 08:53:43 +0000
committerguenther <guenther@openbsd.org>2015-10-13 08:53:43 +0000
commitde0f9d0602fe6cbe74964a59e031511b188e3f8e (patch)
tree1b49dff676d28b5f3aadfd4bd0370cfc01d57a07
parentTo alter just the atime of the mailspool, use utimensat()+UTIME_OMIT instead (diff)
downloadwireguard-openbsd-de0f9d0602fe6cbe74964a59e031511b188e3f8e.tar.xz
wireguard-openbsd-de0f9d0602fe6cbe74964a59e031511b188e3f8e.zip
ctype functions isxdigit() expect an unsigned char value; add missing casts
and adjust variable types to get correct behavior ok beck@ millert@
-rw-r--r--usr.bin/ftp/fetch.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ftp/fetch.c b/usr.bin/ftp/fetch.c
index f7cfd99f019..bd3a3b3a836 100644
--- a/usr.bin/ftp/fetch.c
+++ b/usr.bin/ftp/fetch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fetch.c,v 1.142 2015/09/10 13:43:35 jsing Exp $ */
+/* $OpenBSD: fetch.c,v 1.143 2015/10/13 08:53:43 guenther Exp $ */
/* $NetBSD: fetch.c,v 1.14 1997/08/18 10:20:20 lukem Exp $ */
/*-
@@ -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;