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 */