summaryrefslogtreecommitdiffstats
path: root/server/vhost.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2011-06-22 22:45:34 +0200
committerStefan Fritsch <sf@apache.org>2011-06-22 22:45:34 +0200
commit51692222f63283f2a25be0988a976c0516b07d38 (patch)
tree4993c6933929622ca70e6b38e084971ddc9af618 /server/vhost.c
parentWe already have ap_str_tolower(), so also add ap_str_toupper() function and use (diff)
downloadapache2-51692222f63283f2a25be0988a976c0516b07d38.tar.xz
apache2-51692222f63283f2a25be0988a976c0516b07d38.zip
Various code cleanup
PR: 51398 Submitted by: Christophe Jaillet <christophe jaillet wanadoo fr> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138627 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/vhost.c')
-rw-r--r--server/vhost.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/vhost.c b/server/vhost.c
index c71c5d8c77..b067f20960 100644
--- a/server/vhost.c
+++ b/server/vhost.c
@@ -158,9 +158,9 @@ static const char *get_addresses(apr_pool_t *p, const char *w_,
if (*w_ == '\0')
return NULL;
- w = apr_pstrdup(p, w_);
+ wlen = strlen(w_); /* wlen must be > 0 at this point */
+ w = apr_pstrmemdup(p, w_, wlen);
/* apr_parse_addr_port() doesn't understand ":*" so handle that first. */
- wlen = strlen(w); /* wlen must be > 0 at this point */
wild_port = 0;
if (w[wlen - 1] == '*') {
if (wlen < 2) {