Added patch to use random names when caching very long urls (fixes Wine Staging Bug #266).

This commit is contained in:
Sebastian Lackner
2015-05-28 23:10:33 +02:00
parent bcb19df630
commit 412af27a17
5 changed files with 46 additions and 1 deletions

View File

@@ -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:

View File

@@ -0,0 +1,25 @@
From c437a2f59781727e9dd2109eafc9fa750404c260 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
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

View File

@@ -0,0 +1 @@
Fixes: Use random names when caching very long urls in wininet