From: Vsevolod Stakhov Date: Mon, 15 Nov 2010 17:03:56 +0000 (+0300) Subject: Try to fix bug with absent trie items in redirectors list. X-Git-Tag: 0.3.7~112 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c85dd608a568d61e3b24c55b715ad37ceedb7110;p=rspamd.git Try to fix bug with absent trie items in redirectors list. --- 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 */