Andrew Nguyen : kernel32: Ignore empty environment values from registry.

Alexandre Julliard julliard at winehq.org
Thu Dec 24 10:27:19 CST 2009


Module: wine
Branch: master
Commit: 9294882b947a509021db47410a752c73e57dee31
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9294882b947a509021db47410a752c73e57dee31

Author: Andrew Nguyen <arethusa26 at gmail.com>
Date:   Wed Dec 23 11:31:52 2009 -0600

kernel32: Ignore empty environment values from registry.

---

 dlls/kernel32/process.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index 45488aa..eb39f5c 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -378,6 +378,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type )
         env_value.Length = env_value.MaximumLength = info->DataLength;
         if (env_value.Length && !env_value.Buffer[env_value.Length/sizeof(WCHAR)-1])
             env_value.Length -= sizeof(WCHAR);  /* don't count terminating null if any */
+        if (!env_value.Length) continue;
         if (info->Type == REG_EXPAND_SZ)
         {
             WCHAR buf_expanded[1024];




More information about the wine-cvs mailing list