# HG changeset patch # User Timo Sirainen # Date 1206899150 -10800 # Node ID 00d3b46f61e6b50573400f6fde05bd855e716b2e # Parent eec74a6ad62e02d00d82abf6e7406727b2a2869b matches[] wasn't also allocated enough memory. 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 @@ 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);