summaryrefslogtreecommitdiffstats
path: root/src/libutil/regexp.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-07 22:00:14 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-03-07 22:00:14 +0000
commit908df97327a0e7e0c21053a67ac22e66610d30d1 (patch)
tree1ed77671e1cb25f39693aa3d915042cda779fd2d /src/libutil/regexp.c
parent15200f78979740022c0a58ace91447fd99a3075b (diff)
downloadrspamd-908df97327a0e7e0c21053a67ac22e66610d30d1.tar.gz
rspamd-908df97327a0e7e0c21053a67ac22e66610d30d1.zip
Start moving to the rspamd regexps.
Diffstat (limited to 'src/libutil/regexp.c')
-rw-r--r--src/libutil/regexp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c
index 6da0a663e..3b76d15e0 100644
--- a/src/libutil/regexp.c
+++ b/src/libutil/regexp.c
@@ -296,6 +296,10 @@ rspamd_regexp_search (rspamd_regexp_t *re, const gchar *text, gsize len,
g_assert (re != NULL);
g_assert (text != NULL);
+ if (len == 0) {
+ len = strlen (text);
+ }
+
if (end != NULL && *end != NULL) {
/* Incremental search */
mt = (*end);