https://git.reactos.org/?p=reactos.git;a=commitdiff;h=2bc44bf95c0d967a2b2fd…
commit 2bc44bf95c0d967a2b2fd5a5c8e5bdfe2228b5b4
Author: Doug Lyons <douglyons(a)douglyons.com>
AuthorDate: Tue Feb 6 14:20:57 2024 -0600
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Feb 6 23:20:57 2024 +0300
[MSI] Don't write past end of string when selecting parent directory (#6335)
Import Wine commit:
https://github.com/wine-mirror/wine/commit/bbce5d014db7f023b133d6d09e6846e0…
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 <thomas.faber(a)reactos.org>
Co-authored-by: Fabian Maurer <dark.shadow4(a)web.de>
---
dll/win32/msi/dialog.c | 7 +++++--
media/doc/WINESYNC.txt | 2 +-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/dll/win32/msi/dialog.c b/dll/win32/msi/dialog.c
index 7050d353bb7..97257636e5e 100644
--- a/dll/win32/msi/dialog.c
+++ b/dll/win32/msi/dialog.c
@@ -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 );
diff --git a/media/doc/WINESYNC.txt b/media/doc/WINESYNC.txt
index f6614ac83a9..6528ad4e6c5 100644
--- a/media/doc/WINESYNC.txt
+++ b/media/doc/WINESYNC.txt
@@ -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