dovecot-2.0: doveadm: Another -A crashfix for mail commands that...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 17 18:00:05 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/81e496a5b412
changeset: 11568:81e496a5b412
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jun 17 16:00:01 2010 +0100
description:
doveadm: Another -A crashfix for mail commands that don't print anything.

diffstat:

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

diffs (15 lines):

diff -r c9b793187ca6 -r 81e496a5b412 src/doveadm/doveadm-print.c
--- a/src/doveadm/doveadm-print.c	Thu Jun 17 15:40:43 2010 +0100
+++ b/src/doveadm/doveadm-print.c	Thu Jun 17 16:00:01 2010 +0100
@@ -87,6 +87,11 @@
 {
 	struct doveadm_print_header_context *hdr;
 
+	if (ctx == NULL) {
+		/* command doesn't really print anything */
+		return;
+	}
+
 	array_foreach_modifiable(&ctx->headers, hdr) {
 		if (strcmp(hdr->key, key) == 0) {
 			i_free(hdr->sticky_value);


More information about the dovecot-cvs mailing list