diff options
-rw-r--r-- | src/libserver/symcache/symcache_c.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libserver/symcache/symcache_c.cxx b/src/libserver/symcache/symcache_c.cxx index 6ab1206c0..bd1c1abc4 100644 --- a/src/libserver/symcache/symcache_c.cxx +++ b/src/libserver/symcache/symcache_c.cxx @@ -106,6 +106,11 @@ rspamd_symcache_add_symbol_augmentation(struct rspamd_symcache *cache, return false; } + /* Handle empty or absent strings equally */ + if (value == nullptr || value[0] == '\0') { + return item->add_augmentation(*real_cache, augmentation, std::nullopt); + } + return item->add_augmentation(*real_cache, augmentation, value); } |