From 0b4520d54c35d604e94ad9a2c5e67cc9a3342364 Mon Sep 17 00:00:00 2001 From: Jim Jagielski Date: Thu, 17 Oct 2013 17:21:04 +0000 Subject: [PATCH] from an idea by Yann Ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1533169 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 3210c21a90..50f67c68fe 100644 --- a/modules/proxy/proxy_util.c +++ b/modules/proxy/proxy_util.c @@ -102,7 +102,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src, thelen = thenil - dst; /* Assume the typical case is smaller copying into bigger so we have a fast return */ - if ((thelen < dlen-1) || ((strlen(src)) == thelen)) { + if ((thelen < dlen-1) || (src[thelen] == '\0') { return APR_SUCCESS; } /* XXX: APR_ENOSPACE would be better */ -- 2.40.0