summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-10-12 19:27:09 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2007-10-12 19:27:09 +0000
commit3b2298382396af5603a134e4d39cbfd5803661c0 (patch)
tree1c83e5bda4066493bf033cfae078c08d0f316a89
parent6090347c938f0fc9af7a72698f15c9aa70416969 (diff)
downloadlibapr-3b2298382396af5603a134e4d39cbfd5803661c0.tar.gz
zero bytes is a LEGAL length of an envvar value
(also fix a minor spelling error) Backports: 582701 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/0.9.x@584240 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--misc/win32/env.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/misc/win32/env.c b/misc/win32/env.c
index abb983d71..644f59b88 100644
--- a/misc/win32/env.c
+++ b/misc/win32/env.c
@@ -78,12 +78,9 @@ APR_DECLARE(apr_status_t) apr_env_get(char **value,
wvalue = apr_palloc(pool, size * sizeof(*wvalue));
size = GetEnvironmentVariableW(wenvvar, wvalue, size);
- if (size == 0)
- /* Mid-air collision?. Somebody must've changed the env. var. */
- return APR_INCOMPLETE;
inchars = wcslen(wvalue) + 1;
- outchars = 3 * inchars; /* Enougn for any UTF-8 representation */
+ outchars = 3 * inchars; /* Enough for any UTF-8 representation */
val = apr_palloc(pool, outchars);
status = apr_conv_ucs2_to_utf8(wvalue, &inchars, val, &outchars);
if (status)