diff options
-rw-r--r-- | src/libutil/regexp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/regexp.c b/src/libutil/regexp.c index e9934083d..700b595c1 100644 --- a/src/libutil/regexp.c +++ b/src/libutil/regexp.c @@ -331,12 +331,12 @@ rspamd_regexp_new_len (const gchar *pattern, gsize len, const gchar *flags, return NULL; } - if (flags == NULL && start < end) { + if (flags == NULL && start + 1 < end) { /* We need to parse pattern and detect flags set */ if (*start == '/') { sep = '/'; } - else if (*start == 'm') { + else if (*start == 'm' && !g_ascii_isalnum(start[1])) { start ++; sep = *start; |