commit fe2a739: [Minor] Add a small protection against bad characters in symbols
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Jan 4 16:00:07 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-01-04 14:44:06 +0000
URL: https://github.com/rspamd/rspamd/commit/fe2a739af4ad2bce76600e7386fc0ad12c3da354 (HEAD -> master)
[Minor] Add a small protection against bad characters in symbols
---
src/libserver/rspamd_symcache.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/libserver/rspamd_symcache.c b/src/libserver/rspamd_symcache.c
index fedd2cf02..1b02b62a8 100644
--- a/src/libserver/rspamd_symcache.c
+++ b/src/libserver/rspamd_symcache.c
@@ -1056,6 +1056,11 @@ rspamd_symcache_add_symbol (struct rspamd_symcache *cache,
if (name != NULL && !(type & SYMBOL_TYPE_CALLBACK)) {
struct rspamd_symcache_item *existing;
+ if (strcspn (name, " \t\n\r") != strlen (name)) {
+ msg_warn_cache ("bogus characters in symbol name: \"%s\"",
+ name);
+ }
+
if ((existing = g_hash_table_lookup (cache->items_by_symbol, name)) != NULL) {
if (existing->type & SYMBOL_TYPE_GHOST) {
More information about the Commits
mailing list