Commit 9294882b authored by Andrew Nguyen's avatar Andrew Nguyen Committed by Alexandre Julliard

kernel32: Ignore empty environment values from registry.

parent 542feda6
......@@ -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];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment