msi: Avoid an out of bounds access in msi_build_directory_name.
This commit is contained in:
parent
9177c08830
commit
b7cefc9997
|
@ -2154,7 +2154,7 @@ WCHAR *msi_build_directory_name( DWORD count, ... )
|
||||||
const WCHAR *str = va_arg( va, const WCHAR * );
|
const WCHAR *str = va_arg( va, const WCHAR * );
|
||||||
if (!str) continue;
|
if (!str) continue;
|
||||||
strcatW( dir, str );
|
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 );
|
va_end( va );
|
||||||
return dir;
|
return dir;
|
||||||
|
|
Loading…
Reference in New Issue