summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-17 13:44:51 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-02-17 15:06:32 +0000
commitf775918665f0313bbeb8f53bafd7e8aa1146e011 (patch)
tree8ba5f26d9a0c2be4ee6ae861dc332ff54a263445 /src
parent84a6185266d99b6c7b4c83c97eff54e007d5d103 (diff)
downloadrspamd-f775918665f0313bbeb8f53bafd7e8aa1146e011.tar.gz
rspamd-f775918665f0313bbeb8f53bafd7e8aa1146e011.zip
Stop regexp flags parsing on the first bad flag.
Diffstat (limited to 'src')
-rw-r--r--src/lua/lua_regexp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lua/lua_regexp.c b/src/lua/lua_regexp.c
index 1b8702d1f..a86424c66 100644
--- a/src/lua/lua_regexp.c
+++ b/src/lua/lua_regexp.c
@@ -152,12 +152,13 @@ lua_regexp_create (lua_State *L)
break;
default:
msg_info ("invalid regexp flag: %c", *flags_str);
+ goto fin;
break;
}
flags_str++;
}
}
-
+fin:
re = g_regex_new (pattern, regexp_flags, 0, &err);
if (re == NULL) {
g_free (pattern);