Blame SOURCES/rsyslog-8.24.0-rhbz1656860-imfile-buffer-overflow.patch

fde8c1
From d5bcd5b89b2f88611e73ea193ce35178b1e89b32 Mon Sep 17 00:00:00 2001
fde8c1
From: Rainer Gerhards <rgerhards@adiscon.com>
fde8c1
Date: Tue, 19 Dec 2017 10:15:46 +0100
fde8c1
Subject: [PATCH] core bugfix: MAXFNAME was set too low
fde8c1
fde8c1
it just permitted 200 chars, with almost all systems permitting for
fde8c1
more. I tried to find a more portable way to find out the actual max,
fde8c1
but this turned out horrible. The next solution would have been to use
fde8c1
dynamic alloc, but that often is overkill. So I now settle to just
fde8c1
increasing the value to 4KiB. This is the Linux limit, and it is by
fde8c1
far the highest I could find. This should be good to go for quite
fde8c1
some while but should not put too much stressure on the stack alloc.
fde8c1
fde8c1
closes https://github.com/rsyslog/rsyslog/issues/2228
fde8c1
---
fde8c1
 runtime/syslogd-types.h | 4 ++--
fde8c1
 1 file changed, 2 insertions(+), 2 deletions(-)
fde8c1
fde8c1
diff --git a/runtime/syslogd-types.h b/runtime/syslogd-types.h
fde8c1
index 2cbe8039a..360f6d557 100644
fde8c1
--- a/runtime/syslogd-types.h
fde8c1
+++ b/runtime/syslogd-types.h
fde8c1
@@ -4,7 +4,7 @@
fde8c1
  *
fde8c1
  * File begun on 2007-07-13 by RGerhards (extracted from syslogd.c)
fde8c1
  *
fde8c1
- * Copyright 2007-2014 Adiscon GmbH.
fde8c1
+ * Copyright 2007-2017 Adiscon GmbH.
fde8c1
  *
fde8c1
  * This file is part of the rsyslog runtime library.
fde8c1
  *
fde8c1
@@ -38,7 +38,7 @@
fde8c1
 # define UNAMESZ	8	/* length of a login name */
fde8c1
 #endif
fde8c1
 #define MAXUNAMES	20	/* maximum number of user names */
fde8c1
-#define MAXFNAME	200	/* max file pathname length */
fde8c1
+#define MAXFNAME	4096	/* max file pathname length */
fde8c1
 
fde8c1
 #define	_DB_MAXDBLEN	128	/* maximum number of db */
fde8c1
 #define _DB_MAXUNAMELEN	128	/* maximum number of user name */