aboutsummaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-14 13:15:24 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-05-14 13:15:24 +0100
commit8cff3d6084888649180394336281405062d2fadd (patch)
tree34ccb1d98756a6452548e6dc8394ff1d963b5a10 /src/libutil/regexp.c
parentfbaa06d71d3421aad83a61c74fb45b9ee996b883 (diff)
downloadrspamd-8cff3d6084888649180394336281405062d2fadd.tar.gz
rspamd-8cff3d6084888649180394336281405062d2fadd.zip
[Fix] Slashing fix: fix captures matching API
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c4
1 files changed, 2 insertions, 2 deletions
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) ==