dovecot-2.2: log: Don't crash if log client sends line with pid=0.

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 18 15:14:12 EET 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/3ca7e0eaaf4b
changeset: 15833:3ca7e0eaaf4b
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 18 15:14:05 2013 +0200
description:
log: Don't crash if log client sends line with pid=0.

diffstat:

 src/log/log-connection.c |  5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r 19e4448dee4f -r 3ca7e0eaaf4b src/log/log-connection.c
--- a/src/log/log-connection.c	Mon Feb 18 15:12:26 2013 +0200
+++ b/src/log/log-connection.c	Mon Feb 18 15:14:05 2013 +0200
@@ -201,6 +201,11 @@
 	}
 
 	i_failure_parse_line(line, &failure);
+	if (failure.pid == 0) {
+		i_error("Invalid log line: %s", line);
+		return;
+	}
+
 	switch (failure.log_type) {
 	case LOG_TYPE_FATAL:
 	case LOG_TYPE_PANIC:


More information about the dovecot-cvs mailing list