dovecot-2.0: Mail sorting: Fixed potential excessive memory usage.

dovecot at dovecot.org dovecot at dovecot.org
Sun Jun 28 05:09:08 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/3f4ae64b27ac
changeset: 9544:3f4ae64b27ac
user:      Timo Sirainen <tss at iki.fi>
date:      Sat Jun 27 22:07:35 2009 -0400
description:
Mail sorting: Fixed potential excessive memory usage.

diffstat:

1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-storage/index/index-sort-string.c |    2 +-

diffs (17 lines):

diff -r 8f74a0f149ad -r 3f4ae64b27ac src/lib-storage/index/index-sort-string.c
--- a/src/lib-storage/index/index-sort-string.c	Sat Jun 27 22:06:00 2009 -0400
+++ b/src/lib-storage/index/index-sort-string.c	Sat Jun 27 22:07:35 2009 -0400
@@ -778,12 +778,12 @@ void index_sort_list_finish_string(struc
 		/* fast path: we have all sort IDs */
 		array_sort(&ctx->nonzero_nodes, sort_node_cmp);
 
+		nodes = array_get(&ctx->nonzero_nodes, &count);
 		if (!array_is_created(&program->seqs))
 			i_array_init(&program->seqs, count);
 		else
 			array_clear(&program->seqs);
 
-		nodes = array_get(&ctx->nonzero_nodes, &count);
 		for (i = 0; i < count; i++) {
 			seq = nodes[i].seq;
 			array_append(&program->seqs, &seq, 1);


More information about the dovecot-cvs mailing list