msi: Don't write past end of string when selecting parent directory.

This commit is contained in:
Fabian Maurer 2024-02-03 08:59:32 +01:00 committed by Alexandre Julliard
parent d6dc917232
commit bbce5d014d

View file

@ -2862,8 +2862,11 @@ static UINT dialog_directorylist_up( msi_dialog *dialog )
/* strip off the last directory */
ptr = PathFindFileNameW( path );
if (ptr != path) *(ptr - 1) = '\0';
PathAddBackslashW( path );
if (ptr != path)
{
*(ptr - 1) = '\0';
PathAddBackslashW( path );
}
dialog_set_property( dialog->package, prop, path );