From: Jim Jagielski Date: Thu, 17 Oct 2013 17:21:04 +0000 (+0000) Subject: from an idea by Yann Ylavic X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce99a3849fd2f45763dc4adcd3f9377d52b59573;p=thirdparty%2Fapache%2Fhttpd.git from an idea by Yann Ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1533169 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_util.c b/modules/proxy/proxy_util.c index 3210c21a90d..50f67c68fe4 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 */