Hans Leidekker : msi: Fix calculation of required buffer size in MsiSummaryInfoGetPropertyW.
Alexandre Julliard
julliard at winehq.org
Fri Oct 23 10:19:02 CDT 2009
Module: wine
Branch: master
Commit: e58ebbf3e0e446375399558d93b7120082f34f22
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e58ebbf3e0e446375399558d93b7120082f34f22
Author: Hans Leidekker <hans at codeweavers.com>
Date: Fri Oct 23 10:49:44 2009 +0200
msi: Fix calculation of required buffer size in MsiSummaryInfoGetPropertyW.
---
dlls/msi/suminfo.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/msi/suminfo.c b/dlls/msi/suminfo.c
index d3db44a..df35c4d 100644
--- a/dlls/msi/suminfo.c
+++ b/dlls/msi/suminfo.c
@@ -607,9 +607,8 @@ static UINT get_prop( MSIHANDLE handle, UINT uiProperty, UINT *puiDataType,
if( str->unicode )
{
- len = MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1,
- str->str.w, *pcchValueBuf );
- len--;
+ len = MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1, NULL, 0 ) - 1;
+ MultiByteToWideChar( CP_ACP, 0, prop->u.pszVal, -1, str->str.w, *pcchValueBuf );
}
else
{
More information about the wine-cvs
mailing list