dovecot-2.2-pigeonhole: doveadm sieve plugin: Fixed dereference ...

pigeonhole at rename-it.nl pigeonhole at rename-it.nl
Tue Jun 17 18:58:32 UTC 2014


details:   http://hg.rename-it.nl/dovecot-2.2-pigeonhole/rev/18c4b82636a4
changeset: 1866:18c4b82636a4
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue Jun 17 20:41:53 2014 +0200
description:
doveadm sieve plugin: Fixed dereference before NULL check problem.
Found by Coverity.

diffstat:

 src/plugins/doveadm-sieve/doveadm-sieve-plugin.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r a2a8fb3cea09 -r 18c4b82636a4 src/plugins/doveadm-sieve/doveadm-sieve-plugin.c
--- a/src/plugins/doveadm-sieve/doveadm-sieve-plugin.c	Tue Jun 17 20:35:18 2014 +0200
+++ b/src/plugins/doveadm-sieve/doveadm-sieve-plugin.c	Tue Jun 17 20:41:53 2014 +0200
@@ -310,8 +310,6 @@
 		return sieve_attribute_unset_script(storage, svstorage, scriptname);
 	}
 
-	sieve_storage_save_set_mtime(save_ctx, value->last_change);
-
 	if (save_ctx == NULL) {
 		/* save initialization failed */
 		mail_storage_set_critical(storage,
@@ -319,6 +317,9 @@
 			sieve_storage_get_last_error(svstorage, NULL));
 		return -1;
 	}
+
+	sieve_storage_save_set_mtime(save_ctx, value->last_change);
+
 	ret = 0;
 	while (i_stream_read(input) > 0) {
 		if (sieve_storage_save_continue(save_ctx) < 0) {


More information about the dovecot-cvs mailing list