summaryrefslogtreecommitdiffstats
path: root/usr.sbin/syslogd
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2015-10-11 23:51:26 +0000
committerbluhm <bluhm@openbsd.org>2015-10-11 23:51:26 +0000
commit9234ca3a84b927d9cfa6d0f320b030066dfe557b (patch)
treeb9c90c39fe8d28098b0dc1c17753e427d7b4bd30 /usr.sbin/syslogd
parentfix regression: ttyname() failure not handled right (diff)
downloadwireguard-openbsd-9234ca3a84b927d9cfa6d0f320b030066dfe557b.tar.xz
wireguard-openbsd-9234ca3a84b927d9cfa6d0f320b030066dfe557b.zip
Pass unsigned char to isdigit(3).
From Michael McConville; OK guenther@
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r--usr.sbin/syslogd/syslogd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c
index 4513772ea41..42dda9f09af 100644
--- a/usr.sbin/syslogd/syslogd.c
+++ b/usr.sbin/syslogd/syslogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: syslogd.c,v 1.196 2015/10/11 20:23:49 guenther Exp $ */
+/* $OpenBSD: syslogd.c,v 1.197 2015/10/11 23:51:26 bluhm Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@@ -1123,7 +1123,7 @@ octet_counting(struct evbuffer *evbuf, char **msg, int drain)
* It can be assumed that octet-counting framing is used if a syslog
* frame starts with a digit.
*/
- if (buf >= end || !isdigit(*buf))
+ if (buf >= end || !isdigit((unsigned char)*buf))
return (-1);
/*
* SYSLOG-FRAME = MSG-LEN SP SYSLOG-MSG
@@ -1131,7 +1131,7 @@ octet_counting(struct evbuffer *evbuf, char **msg, int drain)
* We support up to 5 digits in MSG-LEN, so the maximum is 99999.
*/
for (p = buf; p < end && p < buf + 5; p++) {
- if (!isdigit(*p))
+ if (!isdigit((unsigned char)*p))
break;
}
if (buf >= p || p >= end || *p != ' ')