dovecot-1.3: settings_dup() didn't copy STRLISTs.

dovecot at dovecot.org dovecot at dovecot.org
Fri Apr 17 04:55:53 EEST 2009


details:   http://hg.dovecot.org/dovecot-1.3/rev/be738988c8ab
changeset: 9128:be738988c8ab
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 16 21:55:45 2009 -0400
description:
settings_dup() didn't copy STRLISTs.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-settings/settings-parser.c |    4 +++-

diffs (15 lines):

diff -r 922868605499 -r be738988c8ab src/lib-settings/settings-parser.c
--- a/src/lib-settings/settings-parser.c	Thu Apr 16 21:40:05 2009 -0400
+++ b/src/lib-settings/settings-parser.c	Thu Apr 16 21:55:45 2009 -0400
@@ -906,8 +906,10 @@ void *settings_dup(const struct setting_
 
 			strings = array_get(src_arr, &count);
 			p_array_init(dest_arr, pool, count);
-			for (i = 0; i < count; i += 2)
+			for (i = 0; i < count; i++) {
 				dup = p_strdup(pool, strings[i]);
+				array_append(dest_arr, &dup, 1);
+			}
 			break;
 		}
 		}


More information about the dovecot-cvs mailing list