diff options
author | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-08 01:39:59 +0000 |
---|---|---|
committer | wrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68> | 2007-10-08 01:39:59 +0000 |
commit | 5d117a97d2b529902111005568eb8ddf3a697351 (patch) | |
tree | 116df6b204849c7e8111e9c5dde1575f6648ede8 /misc | |
parent | 2ea51796f9970bc53f692e02359ce700e4e9d9d7 (diff) | |
download | libapr-5d117a97d2b529902111005568eb8ddf3a697351.tar.gz |
zero bytes is a LEGAL length of an envvar value
(also fix a minor spelling error)
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@582701 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'misc')
-rw-r--r-- | misc/win32/env.c | 5 |
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) |