Alexandre Julliard : ntdll: Fix counting of environment strings.
Alexandre Julliard
julliard at winehq.org
Wed Nov 20 16:49:10 CST 2019
Module: wine
Branch: master
Commit: 599deed91cc6a91fa83072ac21d8516a4647e174
URL: https://source.winehq.org/git/wine.git/?a=commit;h=599deed91cc6a91fa83072ac21d8516a4647e174
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Nov 20 16:24:49 2019 +0100
ntdll: Fix counting of environment strings.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48141
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/ntdll/env.c b/dlls/ntdll/env.c
index 6c7ca1e499..79a1805618 100644
--- a/dlls/ntdll/env.c
+++ b/dlls/ntdll/env.c
@@ -526,7 +526,7 @@ char **build_envp( const WCHAR *envW )
if (!(env = RtlAllocateHeap( GetProcessHeap(), 0, length ))) return NULL;
ntdll_wcstoumbs( 0, envW, lenW, env, length, NULL, NULL );
- for (p = env; *p; p += strlen(p) + 1)
+ for (p = env; *p; p += strlen(p) + 1, count++)
if (is_special_env_var( p )) length += 4; /* prefix it with "WINE" */
for (i = 0; i < ARRAY_SIZE( unix_vars ); i++)
More information about the wine-cvs
mailing list