From c85dd608a568d61e3b24c55b715ad37ceedb7110 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 15 Nov 2010 20:03:56 +0300 Subject: [PATCH] Try to fix bug with absent trie items in redirectors list. --- src/plugins/surbl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index 1ebf78991..8627cbbca 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -900,7 +900,8 @@ surbl_tree_url_callback (gpointer key, gpointer value, void *data) f.len = url->hostlen; /* Search in trie */ if (surbl_module_ctx->redirector_trie && - rspamd_trie_lookup (surbl_module_ctx->redirector_trie, url->host, url->hostlen, &idx)) { + rspamd_trie_lookup (surbl_module_ctx->redirector_trie, url->host, url->hostlen, &idx) && + idx < surbl_module_ctx->redirector_ptrs->len) { /* Get corresponding prefix */ red_domain = g_ptr_array_index (surbl_module_ctx->redirector_ptrs, idx); /* Try to find corresponding regexp */ -- 2.39.5