From: Vsevolod Stakhov Date: Mon, 28 Dec 2020 21:07:45 +0000 (+0000) Subject: [Minor] Fix crash on non resolving virtual dependency X-Git-Tag: 2.7~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e9e25230c63574c9a37c4d621a3a5c215d94e2e;p=thirdparty%2Frspamd.git [Minor] Fix crash on non resolving virtual dependency --- diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index ecafae8928..fedd2cf029 100644 --- a/src/libserver/rspamd_symcache.c +++ b/src/libserver/rspamd_symcache.c @@ -586,8 +586,15 @@ rspamd_symcache_process_dep (struct rspamd_symcache *cache, if (dep->vid >= 0) { /* Case of the virtual symbol that depends on another (maybe virtual) symbol */ vdit = rspamd_symcache_find_filter (cache, dep->sym, false); - msg_debug_cache ("process virtual dependency %s(%d) on %s(%d)", it->symbol, - dep->vid, vdit->symbol, vdit->id); + + if (!vdit) { + msg_err_cache ("cannot add dependency from %s on %s: no dependency symbol registered", + dep->sym, dit->symbol); + } + else { + msg_debug_cache ("process virtual dependency %s(%d) on %s(%d)", it->symbol, + dep->vid, vdit->symbol, vdit->id); + } } else { vdit = dit;