mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-26 19:33:31 +00:00
[MSI] Don't write past end of string when selecting parent directory (#6335)
Import Wine commit: https://github.com/wine-mirror/wine/commit/bbce5d014db7f023b133d6d09e6846e027586f7d Since there's not really something sensible to do in the "path contains no backslashes" case (adding a backslash seems pointless), move PathAddBackslashW call inside the if condition to avoid the crash. Fix suggested by Thomas Faber. This fixes heap assert in msi/dialog.c when installing Tortoise GIT. CORE-16693 Co-authored-by: Thomas Faber <[email protected]> Co-authored-by: Fabian Maurer <[email protected]>
This commit is contained in:
co-authored by
Thomas Faber
Fabian Maurer
parent
0bce79a50b
commit
2bc44bf95c
@@ -2943,8 +2943,11 @@ static UINT msi_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 );
|
||||
}
|
||||
|
||||
msi_dialog_set_property( dialog->package, prop, path );
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ dll/win32/msg711.acm # Synced to WineStaging-4.18
|
||||
dll/win32/msgsm32.acm # Synced to WineStaging-4.0
|
||||
dll/win32/mshtml # Synced to WineStaging-1.7.55
|
||||
dll/win32/mshtml.tlb # Synced to WineStaging-1.7.55
|
||||
dll/win32/msi # Synced to WineStaging-7.3
|
||||
dll/win32/msi # Synced to WineStaging-7.3 (+ dialog.c synced to bbce5d014db7f023b133d6d09e6846e027586f7d)
|
||||
dll/win32/msimg32 # Synced to WineStaging-3.3
|
||||
dll/win32/msimtf # Synced to WineStaging-4.18
|
||||
dll/win32/msisip # Synced to WineStaging-4.18
|
||||
|
||||
Reference in New Issue
Block a user