diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-08-08 14:23:24 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2017-08-08 14:23:24 +0000 |
commit | d9ae936fcd6c3400510bd7c9feb84cfd54259f05 (patch) | |
tree | 2696d0fe2b860fcf823639153bcb6f1b6f58b655 /lib | |
parent | 5af320ef68b9c1f9153d5de2529d154ce91b8659 (diff) |
Kernel sendsyslog(2), libc syslog(3), and syslogd(8) restrict and
truncate the length of a syslog message to 8192 bytes. Use one
global define LOG_MAXLINE for all of them.
OK deraadt@ millert@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/gen/syslog_r.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/syslog_r.c b/lib/libc/gen/syslog_r.c index e2c36d22185..3417a651d7e 100644 --- a/lib/libc/gen/syslog_r.c +++ b/lib/libc/gen/syslog_r.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syslog_r.c,v 1.18 2017/08/07 23:49:13 bluhm Exp $ */ +/* $OpenBSD: syslog_r.c,v 1.19 2017/08/08 14:23:23 bluhm Exp $ */ /* * Copyright (c) 1983, 1988, 1993 * The Regents of the University of California. All rights reserved. @@ -73,7 +73,7 @@ __vsyslog_r(int pri, struct syslog_data *data, int cnt; char ch, *p, *t; int saved_errno; -#define TBUF_SIZE (8192+1) +#define TBUF_SIZE (LOG_MAXLINE+1) #define FMT_SIZE (1024+1) char *stdp = NULL, tbuf[TBUF_SIZE], fmt_cpy[FMT_SIZE]; int tbuf_left, fmt_left, prlen; |