1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

from an idea by Yann Ylavic <ylavic.dev@gmail.com>

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1533169 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Jagielski
2013-10-17 17:21:04 +00:00
parent 3d76743798
commit 0b4520d54c

View File

@@ -102,7 +102,7 @@ PROXY_DECLARE(apr_status_t) ap_proxy_strncpy(char *dst, const char *src,
thelen = thenil - dst; thelen = thenil - dst;
/* Assume the typical case is smaller copying into bigger /* Assume the typical case is smaller copying into bigger
so we have a fast return */ so we have a fast return */
if ((thelen < dlen-1) || ((strlen(src)) == thelen)) { if ((thelen < dlen-1) || (src[thelen] == '\0') {
return APR_SUCCESS; return APR_SUCCESS;
} }
/* XXX: APR_ENOSPACE would be better */ /* XXX: APR_ENOSPACE would be better */