msi: Avoid an out of bounds access in msi_build_directory_name.

This commit is contained in:
Hans Leidekker 2012-08-01 11:54:18 +02:00 committed by Alexandre Julliard
parent 9177c08830
commit b7cefc9997
1 changed files with 1 additions and 1 deletions

View File

@ -2154,7 +2154,7 @@ WCHAR *msi_build_directory_name( DWORD count, ... )
const WCHAR *str = va_arg( va, const WCHAR * );
if (!str) continue;
strcatW( dir, str );
if ( i + 1 != count && dir[strlenW( dir ) - 1] != '\\') strcatW( dir, szBackSlash );
if ( i + 1 != count && dir[0] && dir[strlenW( dir ) - 1] != '\\') strcatW( dir, szBackSlash );
}
va_end( va );
return dir;