From: Joe Orton Date: Tue, 17 Oct 2017 08:06:13 +0000 (+0000) Subject: Merge r1812307 from trunk: X-Git-Tag: 2.4.29~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=00fd7410ed14697dff7832709079e78209a73717;p=apache Merge r1812307 from trunk: * 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 --- diff --git a/server/util_expr_eval.c b/server/util_expr_eval.c index a24eaef67b..91f5c3515a 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;