ソースを参照

[Fix] Strip spaces from map keys and values

tags/1.7.4
Vsevolod Stakhov 6年前
コミット
3281d1d77a
2個のファイルの変更4行の追加3行の削除
  1. 2
    2
      src/libutil/map_helpers.c
  2. 2
    1
      src/libutil/radix.c

+ 2
- 2
src/libutil/map_helpers.c ファイルの表示

@@ -76,14 +76,14 @@ struct rspamd_regexp_map_helper {
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); \
key = g_strstrip (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_strchomp (value); \
value = g_strstrip (value); \
} while (0)

gchar *

+ 2
- 1
src/libutil/radix.c ファイルの表示

@@ -197,8 +197,9 @@ rspamd_radix_add_iplist (const gchar *list, const gchar *separators,
cur++;
continue;
}

/* Extract ipnet */
ipnet = *cur;
ipnet = g_strstrip (*cur);
token = strsep (&ipnet, "/");

if (ipnet != NULL) {

読み込み中…
キャンセル
保存