Commit 2eb33f5b authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Avoid accessing uninitialized memory in ACTION_AppSearchReg.

Found by valgrind.
parent 3f70b078
......@@ -445,7 +445,8 @@ static UINT ACTION_AppSearchReg(MSIPACKAGE *package, LPWSTR *appValue, MSISIGNAT
if (sz == 0)
goto end;
if ((ptr = strchrW((LPWSTR)value, '"')) && (end = strchrW(++ptr, '"')))
if ((regType == REG_SZ || regType == REG_EXPAND_SZ) &&
(ptr = strchrW((LPWSTR)value, '"')) && (end = strchrW(++ptr, '"')))
*end = '\0';
else
ptr = (LPWSTR)value;
......
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