-/* $OpenBSD: relayd.c,v 1.143 2015/07/29 20:55:43 benno Exp $ */
+/* $OpenBSD: relayd.c,v 1.144 2015/10/14 07:58:14 reyk Exp $ */
/*
* Copyright (c) 2007 - 2014 Reyk Floeter <reyk@openbsd.org>
for (i = j = 0; i < plen; i++) {
if (j >= (len - 1))
goto fail;
- c = tolower(host[i]);
+ c = tolower((unsigned char)host[i]);
if ((c == '.') && (j == 0 || name[j - 1] == '.'))
continue;
name[j++] = c;
char *str;
for (i = 0; i < len; i++)
- if (!(isprint(ptr[i]) || isspace(ptr[i])))
+ if (!(isprint((unsigned char)ptr[i]) ||
+ isspace((unsigned char)ptr[i])))
break;
if ((str = calloc(1, i + 1)) == NULL)