diff options
-rw-r--r-- | src/libserver/re_cache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/re_cache.c b/src/libserver/re_cache.c index 77f97c97f..332486cdd 100644 --- a/src/libserver/re_cache.c +++ b/src/libserver/re_cache.c @@ -746,7 +746,7 @@ rspamd_re_cache_exec_re (struct rspamd_task *task, re_class->type_data, is_strong); - if (headerlist) { + if (headerlist && headerlist->len > 0) { scvec = g_malloc (sizeof (*scvec) * headerlist->len); lenvec = g_malloc (sizeof (*lenvec) * headerlist->len); @@ -795,7 +795,7 @@ rspamd_re_cache_exec_re (struct rspamd_task *task, re_class->type_data, is_strong); - if (headerlist) { + if (headerlist && headerlist->len > 0) { scvec = g_malloc (sizeof (*scvec) * headerlist->len); lenvec = g_malloc (sizeof (*lenvec) * headerlist->len); |