summaryrefslogtreecommitdiffstats
path: root/src/libutil
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil')
-rw-r--r--src/libutil/map.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libutil/map.c b/src/libutil/map.c
index 72939aa7f..da99e384c 100644
--- a/src/libutil/map.c
+++ b/src/libutil/map.c
@@ -1723,14 +1723,17 @@ err:
*/
#define MAP_STORE_KEY do { \
+ while (g_ascii_isspace (*c) && p > c) { c ++; } \
key = g_malloc (p - c + 1); \
rspamd_strlcpy (key, c, p - c + 1); \
+ key = g_strchomp (key); \
} while (0)
#define MAP_STORE_VALUE do { \
+ while (g_ascii_isspace (*c) && p > c) { c ++; } \
value = g_malloc (p - c + 1); \
rspamd_strlcpy (value, c, p - c + 1); \
- value = g_strstrip (value); \
+ value = g_strchomp (value); \
} while (0)
gchar *
@@ -2067,7 +2070,7 @@ radix_tree_insert_helper (gpointer st, gconstpointer key, gconstpointer value)
{
radix_compressed_t *tree = (radix_compressed_t *)st;
- rspamd_radix_add_iplist ((gchar *)key, " ,;", tree, value, FALSE);
+ rspamd_radix_add_iplist ((gchar *)key, ",", tree, value, FALSE);
}
static void