From 00fd7410ed14697dff7832709079e78209a73717 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 17 Oct 2017 08:06:13 +0000 Subject: [PATCH] Merge r1812307 from trunk: MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * server/util_expr_eval.c (ap_expr_eval_re_backref): Fix gcc 7.x warning. util_expr_eval.c: In function ‘ap_expr_eval_re_backref’: util_expr_eval.c:265:63: error: comparison between pointer and zero character constant [-Werror=pointer-compare] if (!ctx->re_pmatch || !ctx->re_source || *ctx->re_source == '\0' || Reviewed by: rjung, ylavic, jorton git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1812367 13f79535-47bb-0310-9956-ffa450edef68 --- server/util_expr_eval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index a24eaef67bd..91f5c3515a9 100644 --- a/server/util_expr_eval.c +++ b/server/util_expr_eval.c @@ -189,8 +189,8 @@ static const char *ap_expr_eval_re_backref(ap_expr_eval_ctx_t *ctx, unsigned int { int len; - if (!ctx->re_pmatch || !ctx->re_source || *ctx->re_source == '\0' || - ctx->re_nmatch < n + 1) + if (!ctx->re_pmatch || !ctx->re_source || !*ctx->re_source + || **ctx->re_source == '\0' || ctx->re_nmatch < n + 1) return ""; len = ctx->re_pmatch[n].rm_eo - ctx->re_pmatch[n].rm_so; -- 2.47.2