diff --git a/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch b/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch index a9b79414..2f227b6c 100644 --- a/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch +++ b/patches/setupapi-DiskSpaceList/0001-setupapi-Rewrite-DiskSpaceList-logic-using-lists.patch @@ -1,14 +1,14 @@ -From 6fd6c8a87ca47b28314b815f1c71a224c9598528 Mon Sep 17 00:00:00 2001 +From e8d8a980ea81c91802fb26439f936c8cb7f93248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 3 Mar 2016 04:52:35 +0100 Subject: [PATCH] setupapi: Rewrite DiskSpaceList logic using lists. --- - dlls/setupapi/diskspace.c | 181 +++++++++++++++++++++----------------- - 1 file changed, 100 insertions(+), 81 deletions(-) + dlls/setupapi/diskspace.c | 180 +++++++++++++++++++++----------------- + 1 file changed, 100 insertions(+), 80 deletions(-) diff --git a/dlls/setupapi/diskspace.c b/dlls/setupapi/diskspace.c -index 5b89fd5ca99..04bc2696236 100644 +index 425ec80b7e8..04bc2696236 100644 --- a/dlls/setupapi/diskspace.c +++ b/dlls/setupapi/diskspace.c @@ -1,6 +1,7 @@ @@ -178,7 +178,7 @@ index 5b89fd5ca99..04bc2696236 100644 } /*********************************************************************** -@@ -155,55 +163,51 @@ BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, +@@ -155,54 +163,51 @@ BOOL WINAPI SetupAddInstallSectionToDiskSpaceListA(HDSKSPC DiskSpace, /*********************************************************************** * SetupQuerySpaceRequiredOnDriveW (SETUPAPI.@) */ @@ -193,7 +193,6 @@ index 5b89fd5ca99..04bc2696236 100644 - unsigned int i; - LPDISKSPACELIST list = DiskSpace; - BOOL rc = FALSE; -- static const WCHAR bkslsh[]= {'\\',0}; + struct space_list *list = diskspace; + struct file_entry *file; + LONGLONG sum = 0; @@ -225,7 +224,7 @@ index 5b89fd5ca99..04bc2696236 100644 } - lstrcpyW(driveW,DriveSpec); -- lstrcatW(driveW,bkslsh); +- lstrcatW(driveW,L"\\"); - - TRACE("Looking for drive %s\n",debugstr_w(driveW)); - @@ -260,7 +259,7 @@ index 5b89fd5ca99..04bc2696236 100644 } /*********************************************************************** -@@ -253,9 +257,24 @@ BOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace, +@@ -252,9 +257,24 @@ BOOL WINAPI SetupQuerySpaceRequiredOnDriveA(HDSKSPC DiskSpace, /*********************************************************************** * SetupDestroyDiskSpaceList (SETUPAPI.@) */ @@ -288,5 +287,5 @@ index 5b89fd5ca99..04bc2696236 100644 return TRUE; } -- -2.42.0 +2.47.2 diff --git a/patches/shdocvw-ParseURLFromOutsideSource_Tests/0001-shdocvw-Check-precisely-ParseURLFromOutsideSourceX-r.patch b/patches/shdocvw-ParseURLFromOutsideSource_Tests/0001-shdocvw-Check-precisely-ParseURLFromOutsideSourceX-r.patch deleted file mode 100644 index 8ee4fd98..00000000 --- a/patches/shdocvw-ParseURLFromOutsideSource_Tests/0001-shdocvw-Check-precisely-ParseURLFromOutsideSourceX-r.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 1d120cc8d5c61d0642ac7d186b5cd172eadece08 Mon Sep 17 00:00:00 2001 -From: Christian Costa -Date: Tue, 3 Sep 2013 23:28:14 +0200 -Subject: [PATCH] shdocvw: Check precisely ParseURLFromOutsideSourceX returned - values in tests and make code clearer about that. (try 3) - -Try 3: - - fix test check for ansi version - - fix error message for both versions -Try 2: - - improve comments ---- - dlls/shdocvw/shdocvw_main.c | 8 +++++--- - dlls/shdocvw/tests/shdocvw.c | 13 +++++++------ - 2 files changed, 12 insertions(+), 9 deletions(-) - -diff --git a/dlls/shdocvw/shdocvw_main.c b/dlls/shdocvw/shdocvw_main.c -index b5b60054f2c..50524cf43e0 100644 ---- a/dlls/shdocvw/shdocvw_main.c -+++ b/dlls/shdocvw/shdocvw_main.c -@@ -344,8 +344,7 @@ DWORD WINAPI ParseURLFromOutsideSourceW(LPCWSTR url, LPWSTR out, LPDWORD plen, L - HRESULT hr; - DWORD needed; - DWORD len; -- DWORD res = 0; -- -+ DWORD res; - - TRACE("(%s, %p, %p, %p) len: %ld, unknown: 0x%lx\n", debugstr_w(url), out, plen, unknown, - plen ? *plen : 0, unknown ? *unknown : 0); -@@ -371,10 +370,12 @@ DWORD WINAPI ParseURLFromOutsideSourceW(LPCWSTR url, LPWSTR out, LPDWORD plen, L - needed = lstrlenW(buffer_out)+1; - TRACE("got 0x%lx with %s (need %ld)\n", hr, debugstr_w(buffer_out), needed); - -+ res = 0; - if (*plen >= needed) { - if (out != NULL) { - lstrcpyW(out, buffer_out); -- res++; -+ /* On success, 1 is returned for unicode version */ -+ res = 1; - } - needed--; - } -@@ -417,6 +418,7 @@ DWORD WINAPI ParseURLFromOutsideSourceA(LPCSTR url, LPSTR out, LPDWORD plen, LPD - if (*plen >= needed) { - if (out != NULL) { - WideCharToMultiByte(CP_ACP, 0, buffer, -1, out, *plen, NULL, NULL); -+ /* On success, string size including terminating 0 is returned for ansi version */ - res = needed; - } - needed--; -diff --git a/dlls/shdocvw/tests/shdocvw.c b/dlls/shdocvw/tests/shdocvw.c -index fcfd4a644db..f010062ac31 100644 ---- a/dlls/shdocvw/tests/shdocvw.c -+++ b/dlls/shdocvw/tests/shdocvw.c -@@ -212,13 +212,13 @@ static void test_ParseURLFromOutsideSourceA(void) - buffer[sizeof(buffer)-1] = '\0'; - len = sizeof(buffer); - dummy = 0; -- /* on success, len+1 is returned. No idea, if someone depend on this */ -+ /* on success, string size including terminating 0 is returned for ansi version */ - res = pParseURLFromOutsideSourceA(ParseURL_table[i].url, buffer, &len, &dummy); - /* len does not include the terminating 0, when buffer is large enough */ -- ok( res != 0 && len == ParseURL_table[i].len && -+ ok( res == (ParseURL_table[i].len+1) && len == ParseURL_table[i].len && - !lstrcmpA(buffer, ParseURL_table[i].newurl), -- "#%d: got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", -- i, res, len, buffer, ParseURL_table[i].len, ParseURL_table[i].newurl); -+ "#%d: got %ld and %ld with '%s' (expected %ld and %ld with '%s')\n", -+ i, res, len, buffer, ParseURL_table[i].len+1, ParseURL_table[i].len, ParseURL_table[i].newurl); - - - /* use the size test only for the first examples */ -@@ -308,11 +308,12 @@ static void test_ParseURLFromOutsideSourceW(void) - /* len is in characters */ - len = ARRAY_SIZE(bufferW); - dummy = 0; -+ /* on success, 1 is returned for unicode version */ - res = pParseURLFromOutsideSourceW(urlW, bufferW, &len, &dummy); - WideCharToMultiByte(CP_ACP, 0, bufferW, -1, bufferA, sizeof(bufferA), NULL, NULL); -- ok( res != 0 && len == ParseURL_table[0].len && -+ ok( res == 1 && len == ParseURL_table[0].len && - !lstrcmpA(bufferA, ParseURL_table[0].newurl), -- "got %ld and %ld with '%s' (expected '!=0' and %ld with '%s')\n", -+ "got %ld and %ld with '%s' (expected 1 and %ld with '%s')\n", - res, len, bufferA, ParseURL_table[0].len, ParseURL_table[0].newurl); - - --- -2.35.1 - diff --git a/staging/upstream-commit b/staging/upstream-commit index 215ba34e..c564c442 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -17915f730267b2b50550636fb6928a6ace247ccd +59720e7d1b88ed519569135542aa55145a2a6ff7