diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-12-28 21:07:45 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2020-12-28 21:07:45 +0000 |
commit | 4e9e25230c63574c9a37c4d621a3a5c215d94e2e (patch) | |
tree | 05fae586aaea6ea1350cba0776f4ae44f4f61e48 /src/libserver/rspamd_symcache.c | |
parent | 00c154271407b00de368dfc91e6d1cb857a0d712 (diff) | |
download | rspamd-4e9e25230c63574c9a37c4d621a3a5c215d94e2e.tar.gz rspamd-4e9e25230c63574c9a37c4d621a3a5c215d94e2e.zip |
[Minor] Fix crash on non resolving virtual dependency
Diffstat (limited to 'src/libserver/rspamd_symcache.c')
-rw-r--r-- | src/libserver/rspamd_symcache.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c index ecafae892..fedd2cf02 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; |