Fixed MSI buffer overflow.

This commit is contained in:
Mike McCormack 2003-10-28 21:43:14 +00:00 committed by Alexandre Julliard
parent 54b1d87daf
commit 3871395140
1 changed files with 1 additions and 1 deletions

View File

@ -457,7 +457,7 @@ static UINT msi_string2id( string_table *st, LPCWSTR buffer, UINT *id )
static LPWSTR strdupW( LPCWSTR str ) static LPWSTR strdupW( LPCWSTR str )
{ {
UINT len = lstrlenW( str ); UINT len = lstrlenW( str ) + 1;
LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof (WCHAR) ); LPWSTR ret = HeapAlloc( GetProcessHeap(), 0, len*sizeof (WCHAR) );
if( ret ) if( ret )
lstrcpyW( ret, str ); lstrcpyW( ret, str );