File sysklogd-1.4.1-CVE-2014-3634.patch of Package syslogd

---
 syslog.c  |    6 ++++++
 syslogd.c |    7 +++++++
 2 files changed, 13 insertions(+)

--- syslog.c
+++ syslog.c	2014-09-24 16:09:26.062235727 +0000
@@ -72,6 +72,13 @@ static char sccsid[] = "@(#)syslog.c	5.2
 
 #define	_PATH_LOGNAME	"/dev/log"
 
+#undef LOG_FAC
+static inline int LOG_FAC(const int pri)
+{
+	unsigned int fac = pri >> 3;
+	return (fac > 23) ? 23 : fac;
+}
+
 #include "fortify.h"
 
 static int	LogFile = -1;		/* fd for log */
--- syslogd.c
+++ syslogd.c	2014-09-22 08:18:13.122235747 +0000
@@ -565,6 +565,13 @@ static char sccsid[]  __attribute__ ((un
 #define SYSTEMD_PATH_LOG "/run/systemd/journal/syslog"
 #endif
 
+#undef LOG_FAC
+static inline int LOG_FAC(const int pri)
+{
+	unsigned int fac = pri >> 3;
+	return (fac > 23) ? 23 : fac;
+}
+
 char	*ConfFile = _PATH_LOGCONF;
 char	*PidFile = _PATH_LOGPID;
 char	ctty[] = _PATH_CONSOLE;
openSUSE Build Service is sponsored by