From: Vsevolod Stakhov Date: Wed, 24 Oct 2018 09:30:38 +0000 (+0100) Subject: [Minor] Fix dns resolve with no current item X-Git-Tag: 1.8.2~150 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=01844357a361a1af0ab2b359024fd2555e0f10b9;p=rspamd.git [Minor] Fix dns resolve with no current item --- diff --git a/src/libcryptobox/base64/ref.c b/src/libcryptobox/base64/ref.c index 797a91ce7..6d3c295f1 100644 --- a/src/libcryptobox/base64/ref.c +++ b/src/libcryptobox/base64/ref.c @@ -214,7 +214,7 @@ repeat: } if (!ret && inlen > 0) { - /* Skip to the next valid character in input */ + /* Skip to the next valid character in lua_dns_resolver_resolve_commoninput */ while (inlen > 0 && base64_table_dec[*c] >= 254) { c ++; inlen --; diff --git a/src/lua/lua_dns_resolver.c b/src/lua/lua_dns_resolver.c index 8a49fdfaf..d00aaa6a2 100644 --- a/src/lua/lua_dns_resolver.c +++ b/src/lua/lua_dns_resolver.c @@ -455,7 +455,10 @@ lua_dns_resolver_resolve_common (lua_State *L, if (ret) { cbdata->s = session; cbdata->item = rspamd_symbols_cache_get_cur_item (task); - rspamd_symcache_item_async_inc (task, cbdata->item); + + if (cbdata->item) { + rspamd_symcache_item_async_inc (task, cbdata->item); + } /* callback was set up */ lua_pushboolean (L, TRUE); } else {