diff options
author | imp <imp@FreeBSD.org> | 2000-09-19 21:22:20 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2000-09-19 21:22:20 +0000 |
commit | 2720b700adf4ad4c967d8d85ccb4fa96ec23f51d (patch) | |
tree | c57b346a87ab44d0ad60ae35032e51b2a5997bee /usr.sbin/syslogd | |
parent | d7712a127a08e711f4d1a4ffedf551bf49b810c0 (diff) | |
download | FreeBSD-src-2720b700adf4ad4c967d8d85ccb4fa96ec23f51d.zip FreeBSD-src-2720b700adf4ad4c967d8d85ccb4fa96ec23f51d.tar.gz |
Fix unexploitable off by one error as mentioned on Bugtraq.
Diffstat (limited to 'usr.sbin/syslogd')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index f2f7be4..b1f2f77 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -586,7 +586,7 @@ printline(hname, msg) q = line; while ((c = (unsigned char)*p++) != '\0' && - q < &line[sizeof(line) - 3]) { + q < &line[sizeof(line) - 4]) { if ((c & 0x80) && c < 0xA0) { c &= 0x7F; *q++ = 'M'; @@ -1555,7 +1555,6 @@ cfline(line, f, prog, host) f->f_un.f_forw.f_hname[sizeof(f->f_un.f_forw.f_hname)-1] = '\0'; hp = gethostbyname(f->f_un.f_forw.f_hname); if (hp == NULL) { - extern int h_errno; logerror(hstrerror(h_errno)); break; |