Commit 8e94fbf3 authored by Adam Gundy's avatar Adam Gundy Committed by Alexandre Julliard

Don't read uninitialized data when a '$' is found.

parent 60b28eed
......@@ -120,7 +120,8 @@ static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len,
return;
}
for (p = value; (*p && (len > 1)); *buffer++ = *p++, len-- )
p = value;
while (*p && (len > 1))
{
if ((*p == '$') && (p[1] == '{'))
{
......@@ -140,6 +141,11 @@ static void PROFILE_CopyEntry( LPWSTR buffer, LPCWSTR value, int len,
}
p = p2 + 1;
}
else
{
*buffer++ = *p++;
len--;
}
}
if (quote && (len > 1)) buffer--;
*buffer = '\0';
......
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