dovecot: array_clear() only truncates the array, growing its siz...

dovecot at dovecot.org dovecot at dovecot.org
Mon Feb 25 21:25:31 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/20dc04cd6548
changeset: 7284:20dc04cd6548
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Feb 25 21:27:43 2008 +0200
description:
array_clear() only truncates the array, growing its size later doesn't fill
it with zero. Use buffer_reset() instead here which does zeroing.

diffstat:

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

diffs (12 lines):

diff -r 2f559fb30617 -r 20dc04cd6548 src/lib-storage/index/index-mail-headers.c
--- a/src/lib-storage/index/index-mail-headers.c	Mon Feb 25 21:22:01 2008 +0200
+++ b/src/lib-storage/index/index-mail-headers.c	Mon Feb 25 21:27:43 2008 +0200
@@ -215,7 +215,7 @@ void index_mail_parse_header_init(struct
 			  (HEADER_MATCH_SKIP_COUNT-1)) == 0);
 		if (mail->header_match_value == 0) {
 			/* wrapped, we'll have to clear the buffer */
-			array_clear(&mail->header_match);
+			buffer_reset(mail->header_match->arr.buffer);
 			mail->header_match_value = HEADER_MATCH_SKIP_COUNT;
 		}
 	}


More information about the dovecot-cvs mailing list