From 8cff3d6084888649180394336281405062d2fadd Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 14 May 2020 13:15:24 +0100 Subject: [Fix] Slashing fix: fix captures matching API --- src/libutil/regexp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index 0216c95e8..396da80d1 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -632,7 +632,7 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, *end = mt + ovec[1]; } - if (captures != NULL && rc > 1) { + if (captures != NULL && rc >= 1) { struct rspamd_re_capture *elt; g_assert (g_array_get_element_size (captures) == @@ -746,7 +746,7 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len, *end = mt + ovec[1]; } - if (captures != NULL && novec > 1) { + if (captures != NULL && novec >= 1) { struct rspamd_re_capture *elt; g_assert (g_array_get_element_size (captures) == -- cgit v1.2.3