From 4c58684c80fa6c2d82ab63dd608ec11e6e5d422c Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Fri, 20 Nov 2020 12:29:30 +0300 Subject: [PATCH] Ignoring pcre_study() error. It provides optional optimization that shouldn't be fatal for regex compilation. --- src/njs_pcre.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/njs_pcre.c b/src/njs_pcre.c index c8fa5ba2..2fafea7a 100644 --- a/src/njs_pcre.c +++ b/src/njs_pcre.c @@ -94,10 +94,8 @@ njs_regex_compile(njs_regex_t *regex, u_char *source, size_t len, regex->extra = pcre_study(regex->code, 0, &errstr); if (njs_slow_path(errstr != NULL)) { - njs_alert(ctx->trace, NJS_LEVEL_ERROR, + njs_alert(ctx->trace, NJS_LEVEL_WARN, "pcre_study(\"%s\") failed: %s", pattern, errstr); - - goto done; } err = pcre_fullinfo(regex->code, NULL, PCRE_INFO_CAPTURECOUNT, -- 2.47.3