]> granicus.if.org Git - apache/commitdiff
from an idea by Yann Ylavic <ylavic.dev@gmail.com>
authorJim Jagielski <jim@apache.org>
Thu, 17 Oct 2013 17:21:04 +0000 (17:21 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 17 Oct 2013 17:21:04 +0000 (17:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1533169 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c

index 3210c21a90db23e8137dbac7f86c566def100218..50f67c68fe400cac1aae76ae38fa2dcba4e570c9 100644 (file)
@@ -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 */