Module: wine Branch: master Commit: bbce5d014db7f023b133d6d09e6846e027586f7d URL: https://gitlab.winehq.org/wine/wine/-/commit/bbce5d014db7f023b133d6d09e6846e...
Author: Fabian Maurer dark.shadow4@web.de Date: Sat Feb 3 08:59:32 2024 +0100
msi: Don't write past end of string when selecting parent directory.
---
dlls/msi/dialog.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index ba8ca526266..f70b127a7a5 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -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 );