-/* $OpenBSD: priv.c,v 1.19 2021/11/29 05:17:35 deraadt Exp $ */
+/* $OpenBSD: priv.c,v 1.20 2022/12/15 16:01:40 dv Exp $ */
/*
* Copyright (c) 2016 Reyk Floeter <reyk@openbsd.org>
if (strlen(name) >= IF_NAMESIZE)
return (-1);
/* Group can not end with a digit */
- if (name[0] && isdigit(name[strlen(name) - 1]))
+ if (name[0] && isdigit((unsigned char)name[strlen(name) - 1]))
return (-1);
return (0);
}
-/* $OpenBSD: vmd.c,v 1.133 2022/10/31 14:02:11 dv Exp $ */
+/* $OpenBSD: vmd.c,v 1.134 2022/12/15 16:01:40 dv Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
goto fail;
} else {
for (s = vcp->vcp_name; *s != '\0'; ++s) {
- if (!(isalnum(*s) || *s == '.' || *s == '-' ||
- *s == '_')) {
+ if (!(isalnum((unsigned char)*s) || *s == '.' || \
+ *s == '-' || *s == '_')) {
log_warnx("invalid VM name");
goto fail;
}
size_t i;
for (i = 0; i < len; i++)
- if (!isprint(ptr[i]))
+ if (!isprint((unsigned char)ptr[i]))
break;
return strndup(ptr, i);