dovecot-2.2: doveadm who: Don't crash if server happens to send ...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 16 13:28:31 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/24659b98b271
changeset: 17500:24659b98b271
user: Timo Sirainen <tss at iki.fi>
date: Mon Jun 16 16:27:12 2014 +0300
description:
doveadm who: Don't crash if server happens to send broken input (second try).
Found by Coverity
diffstat:
src/doveadm/doveadm-who.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diffs (12 lines):
diff -r d6882dfa08d7 -r 24659b98b271 src/doveadm/doveadm-who.c
--- a/src/doveadm/doveadm-who.c Mon Jun 16 16:26:09 2014 +0300
+++ b/src/doveadm/doveadm-who.c Mon Jun 16 16:27:12 2014 +0300
@@ -61,6 +61,8 @@
memset(line_r, 0, sizeof(*line_r));
p = strchr(ident, '/');
+ if (p == NULL)
+ return -1;
line_r->pid = strtoul(pid_str, NULL, 10);
line_r->service = t_strdup_until(ident, p++);
line_r->username = strchr(p, '/');
More information about the dovecot-cvs
mailing list