From 412af27a176909b1e35ede2a0fffbb3d6b3e2e21 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 28 May 2015 23:10:33 +0200 Subject: [PATCH] Added patch to use random names when caching very long urls (fixes Wine Staging Bug #266). --- README.md | 3 ++- debian/changelog | 2 ++ patches/patchinstall.sh | 16 ++++++++++++ ...om-names-when-caching-very-long-urls.patch | 25 +++++++++++++++++++ patches/wininet-Cache_Long_URLs/definition | 1 + 5 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 patches/wininet-Cache_Long_URLs/0001-wininet-Use-random-names-when-caching-very-long-urls.patch create mode 100644 patches/wininet-Cache_Long_URLs/definition diff --git a/README.md b/README.md index 291671a4..c6acca7c 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [7]:** +**Bug fixes and features included in the next upcoming release [8]:** * Add shell32 placeholder icons to match offsets with Windows ([Wine Bug #30185](https://bugs.winehq.org/show_bug.cgi?id=30185)) * Add stub for iphlpapi.ConvertInterfaceLuidToGuid ([Wine Bug #38576](https://bugs.winehq.org/show_bug.cgi?id=38576)) @@ -48,6 +48,7 @@ Included bug fixes and improvements * Also handle '\r' as whitespace in wbemprox queries * Assign a drive serial number during prefix creation/update ([Wine Bug #17823](https://bugs.winehq.org/show_bug.cgi?id=17823)) * Support for ws2_32.dll.WSAPoll ([Wine Bug #38601](https://bugs.winehq.org/show_bug.cgi?id=38601)) +* Use random names when caching very long urls in wininet **Bug fixes and features in Wine Staging 1.7.43 [235]:** diff --git a/debian/changelog b/debian/changelog index 8f64f9c3..a346eeee 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ wine-staging (1.7.44) UNRELEASED; urgency=low * Added patch for support of ws2_32.dll.WSAPoll. * Added patch to allow to enable/disable InsertMode in wineconsole settings. * Added patch for stub of iphlpapi.ConvertInterfaceLuidToGuid. + * Added patch to use random names when caching very long urls (fixes Wine + Staging Bug #266). * Removed patch to reset device state in SysKeyboard*Impl_Acquire (accepted upstream). * Removed patch to avoid creating thread queues for foreign threads in diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 2bb29435..89e3f8ec 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -267,6 +267,7 @@ patch_enable_all () enable_winex11_Window_Style="$1" enable_winex11_XEMBED="$1" enable_winex11_wglShareLists="$1" + enable_wininet_Cache_Long_URLs="$1" enable_wininet_Cleanup="$1" enable_wininet_ParseX509EncodedCertificateForListBoxEntry="$1" enable_winmm_Delay_Import_Depends="$1" @@ -861,6 +862,9 @@ patch_enable () winex11-wglShareLists) enable_winex11_wglShareLists="$2" ;; + wininet-Cache_Long_URLs) + enable_wininet_Cache_Long_URLs="$2" + ;; wininet-Cleanup) enable_wininet_Cleanup="$2" ;; @@ -5539,6 +5543,18 @@ if test "$enable_winex11_wglShareLists" -eq 1; then ) >> "$patchlist" fi +# Patchset wininet-Cache_Long_URLs +# | +# | Modified files: +# | * dlls/wininet/urlcache.c +# | +if test "$enable_wininet_Cache_Long_URLs" -eq 1; then + patch_apply wininet-Cache_Long_URLs/0001-wininet-Use-random-names-when-caching-very-long-urls.patch + ( + echo '+ { "Michael Müller", "wininet: Use random names when caching very long urls.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wininet-Cleanup # | # | This patchset fixes the following Wine bugs: diff --git a/patches/wininet-Cache_Long_URLs/0001-wininet-Use-random-names-when-caching-very-long-urls.patch b/patches/wininet-Cache_Long_URLs/0001-wininet-Use-random-names-when-caching-very-long-urls.patch new file mode 100644 index 00000000..9b7a1847 --- /dev/null +++ b/patches/wininet-Cache_Long_URLs/0001-wininet-Use-random-names-when-caching-very-long-urls.patch @@ -0,0 +1,25 @@ +From c437a2f59781727e9dd2109eafc9fa750404c260 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Thu, 28 May 2015 22:47:20 +0200 +Subject: wininet: Use random names when caching very long urls. + +--- + dlls/wininet/urlcache.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/dlls/wininet/urlcache.c b/dlls/wininet/urlcache.c +index 276132b..0e5fe3c 100644 +--- a/dlls/wininet/urlcache.c ++++ b/dlls/wininet/urlcache.c +@@ -2630,7 +2630,7 @@ static BOOL urlcache_entry_create(const char *url, const char *ext, WCHAR *full_ + if(!InternetCrackUrlA(url, 0, 0, &uc)) + uc.dwUrlPathLength = 0; + +- if(!uc.dwUrlPathLength) { ++ if(!uc.dwUrlPathLength || uc.dwUrlPathLength >= sizeof(file_name)) { + file_name[0] = 0; + }else { + char *p, *e; +-- +2.4.1 + diff --git a/patches/wininet-Cache_Long_URLs/definition b/patches/wininet-Cache_Long_URLs/definition new file mode 100644 index 00000000..e7be91b0 --- /dev/null +++ b/patches/wininet-Cache_Long_URLs/definition @@ -0,0 +1 @@ +Fixes: Use random names when caching very long urls in wininet