dovecot-2.2-pigeonhole: lib-sieve: Small change in Sieve generat...

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/d4a2d592b6f9
changeset: 1867:d4a2d592b6f9
user:      Stephan Bosch <stephan at rename-it.nl>
date:      Tue Jun 17 20:44:47 2014 +0200
description:
lib-sieve: Small change in Sieve generator to make static analyzer happier.
Reported by Coverity.

diffstat:

 src/lib-sieve/sieve-generator.c |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 18c4b82636a4 -r d4a2d592b6f9 src/lib-sieve/sieve-generator.c
--- a/src/lib-sieve/sieve-generator.c	Tue Jun 17 20:41:53 2014 +0200
+++ b/src/lib-sieve/sieve-generator.c	Tue Jun 17 20:44:47 2014 +0200
@@ -459,6 +459,8 @@
 		sbin = sieve_binary_block_get_binary(sblock);
 	}
 
+	i_assert(sbin != NULL);
+
 	sieve_binary_ref(sbin);
 	gentr->genenv.sbin = sbin;
 	gentr->genenv.sblock = sblock;
@@ -472,7 +474,7 @@
 	/* Load extensions linked to the AST and emit a list in code */
 	extensions = sieve_ast_extensions_get(gentr->genenv.ast, &ext_count);
 	(void) sieve_binary_emit_unsigned(sblock, ext_count);
-	for ( i = 0; i < ext_count && sbin != NULL; i++ ) {
+	for ( i = 0; i < ext_count; i++ ) {
 		const struct sieve_extension *ext = extensions[i];
 
 		/* Link to binary */


More information about the dovecot-cvs mailing list