aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/libcryptobox/base64/ref.c2
-rw-r--r--src/lua/lua_dns_resolver.c5
2 files changed, 5 insertions, 2 deletions
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 {