Author: wrowe Date: Fri Oct 12 12:27:09 2007 New Revision: 584240 URL: http://svn.apache.org/viewvc?rev=584240&view=rev Log: zero bytes is a LEGAL length of an envvar value (also fix a minor spelling error) Backports: 582701 Modified: apr/apr/branches/0.9.x/misc/win32/env.c Modified: apr/apr/branches/0.9.x/misc/win32/env.c URL: http://svn.apache.org/viewvc/apr/apr/branches/0.9.x/misc/win32/env.c?rev=584240&r1=584239&r2=584240&view=diff ============================================================================== --- apr/apr/branches/0.9.x/misc/win32/env.c (original) +++ apr/apr/branches/0.9.x/misc/win32/env.c Fri Oct 12 12:27:09 2007 @@ -78,12 +78,9 @@ 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)