]> source.dussan.org Git - rspamd.git/commitdiff
Stop regexp flags parsing on the first bad flag.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Feb 2015 13:44:51 +0000 (13:44 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 17 Feb 2015 15:06:32 +0000 (15:06 +0000)
src/lua/lua_regexp.c

index 1b8702d1fb5678c14f724bda2e8e348fa385b7f6..a86424c66ac1e93cffd6f159e50f5eee4d78abca 100644 (file)
@@ -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);