Hans Leidekker : msi: Avoid accessing uninitialized memory in ACTION_AppSearchReg.
Alexandre Julliard
julliard at winehq.org
Tue Oct 27 09:46:31 CDT 2009
Module: wine
Branch: master
Commit: 2eb33f5bcb008e88c7adf45bf77b02537ed1cb2d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2eb33f5bcb008e88c7adf45bf77b02537ed1cb2d
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Oct 27 10:07:50 2009 +0100
msi: Avoid accessing uninitialized memory in ACTION_AppSearchReg.
Found by valgrind.
---
dlls/msi/appsearch.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index 4ef4087..95daabb 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -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;
More information about the wine-cvs
mailing list