Commit b7cefc99 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Avoid an out of bounds access in msi_build_directory_name.

parent 9177c088
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment