dovecot-1.2: dict-file: Fixed a crash.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jan 19 19:09:22 EET 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/b5f8834ec679
changeset: 8656:b5f8834ec679
user: Timo Sirainen <tss at iki.fi>
date: Mon Jan 19 12:08:24 2009 -0500
description:
dict-file: Fixed a crash.
diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
src/lib-dict/dict-file.c | 2 +-
diffs (12 lines):
diff -r 46f95c498708 -r b5f8834ec679 src/lib-dict/dict-file.c
--- a/src/lib-dict/dict-file.c Mon Jan 19 11:55:26 2009 -0500
+++ b/src/lib-dict/dict-file.c Mon Jan 19 12:08:24 2009 -0500
@@ -256,7 +256,7 @@ static void file_dict_apply_changes(stru
diff += changes[i].value.diff;
tmp = t_strdup_printf("%lld", diff);
new_len = strlen(tmp);
- if (new_len > strlen(old_value))
+ if (old_value == NULL || new_len > strlen(old_value))
value = p_strdup(dict->hash_pool, tmp);
else {
memcpy(old_value, tmp, new_len + 1);
More information about the dovecot-cvs
mailing list