Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7443:00d3b46f61e6 HEAD
matches[] wasn't also allocated enough memory.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sun, 30 Mar 2008 20:45:50 +0300 |
parents | eec74a6ad62e |
children | 9d694f41a699 |
files | src/lib/str-find.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ 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);