Mercurial > dovecot > original-hg > dovecot-2.1
changeset 14932:87a9eec10145
fts: Fixed crash when searching virtual mailboxes and fts backend without lookup_multi().
Patch by Mike Abbott / Apple
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 20 Mar 2013 18:46:10 +0200 |
parents | a7928075f0fd |
children | e511408bd991 |
files | src/plugins/fts/fts-api.c |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/fts/fts-api.c Mon Mar 04 15:53:42 2013 +0200 +++ b/src/plugins/fts/fts-api.c Wed Mar 20 18:46:10 2013 +0200 @@ -337,8 +337,13 @@ result->box_results = p_new(result->pool, struct fts_result, i+1); for (i = 0; boxes[i] != NULL; i++) { + struct fts_result *box_result = &result->box_results[i]; + + p_array_init(&box_result->definite_uids, result->pool, 32); + p_array_init(&box_result->maybe_uids, result->pool, 32); + p_array_init(&box_result->scores, result->pool, 32); if (backend->v.lookup(backend, boxes[i], args, - and_args, &result->box_results[i]) < 0) + and_args, box_result) < 0) return -1; } return 0;