dovecot-1.1: matches[] wasn't also allocated enough memory.
dovecot at dovecot.org
dovecot at dovecot.org
Sun Mar 30 20:45:53 EEST 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/00d3b46f61e6
changeset: 7443:00d3b46f61e6
user: Timo Sirainen <tss at iki.fi>
date: Sun Mar 30 20:45:50 2008 +0300
description:
matches[] wasn't also allocated enough memory.
diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
src/lib/str-find.c | 2 +-
diffs (12 lines):
diff -r eec74a6ad62e -r 00d3b46f61e6 src/lib/str-find.c
--- a/src/lib/str-find.c Sun Mar 30 11:57:57 2008 +0300
+++ b/src/lib/str-find.c Sun Mar 30 20:45:50 2008 +0300
@@ -82,7 +82,7 @@ struct str_find_context *str_find_init(p
ctx = p_malloc(pool, sizeof(struct str_find_context) +
sizeof(ctx->goodtab[0]) * key_len);
ctx->pool = pool;
- ctx->matches = p_malloc(pool, key_len);
+ ctx->matches = p_new(pool, unsigned int, key_len);
ctx->key_len = key_len;
ctx->key = p_malloc(pool, key_len);
memcpy(ctx->key, key, key_len);
More information about the dovecot-cvs
mailing list