diff --git a/patches/ntdll-RtlFirstFreeAce/0001-ntdll-Check-return-parameter-before-use.patch b/patches/ntdll-RtlFirstFreeAce/0001-ntdll-Check-return-parameter-before-use.patch deleted file mode 100644 index 61d00761..00000000 --- a/patches/ntdll-RtlFirstFreeAce/0001-ntdll-Check-return-parameter-before-use.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 240b46c41f284b6ff96b990b9b719a18919fb6dd Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Wed, 3 Mar 2021 08:56:39 +1100 -Subject: [PATCH 1/2] ntdll: Check return parameter before use - ---- - dlls/ntdll/sec.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c -index eccfc82ce8c..5c1c9b1fbb0 100644 ---- a/dlls/ntdll/sec.c -+++ b/dlls/ntdll/sec.c -@@ -1172,6 +1172,8 @@ NTSTATUS WINAPI RtlAddAce( - return STATUS_INVALID_PARAMETER; - if (!RtlFirstFreeAce(acl,&targetace)) - return STATUS_INVALID_PARAMETER; -+ if (!targetace) -+ return STATUS_ALLOTTED_SPACE_EXCEEDED; - nrofaces=0;ace=acestart; - while (((BYTE *)ace - (BYTE *)acestart) < acelen) { - nrofaces++; --- -2.30.1 - diff --git a/patches/ntdll-RtlFirstFreeAce/0002-ntdll-RtlFirstFreeAce-only-return-FALSE-on-error.patch b/patches/ntdll-RtlFirstFreeAce/0002-ntdll-RtlFirstFreeAce-only-return-FALSE-on-error.patch deleted file mode 100644 index 47d06926..00000000 --- a/patches/ntdll-RtlFirstFreeAce/0002-ntdll-RtlFirstFreeAce-only-return-FALSE-on-error.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0d2d659fbfb73fe046626d256ca5ee2878d9288b Mon Sep 17 00:00:00 2001 -From: Alistair Leslie-Hughes -Date: Mon, 8 Feb 2021 13:16:52 +1100 -Subject: [PATCH 2/2] ntdll: RtlFirstFreeAce only return FALSE on error - ---- - dlls/ntdll/sec.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/dlls/ntdll/sec.c b/dlls/ntdll/sec.c -index 5c1c9b1fbb0..9cebcb4f58e 100644 ---- a/dlls/ntdll/sec.c -+++ b/dlls/ntdll/sec.c -@@ -1149,9 +1149,8 @@ BOOLEAN WINAPI RtlFirstFreeAce( - return FALSE; - ace = (PACE_HEADER)(((BYTE*)ace)+ace->AceSize); - } -- if ((BYTE *)ace >= (BYTE *)acl + acl->AclSize) -- return FALSE; -- *x = ace; -+ if ((BYTE *)ace <= (BYTE *)acl + acl->AclSize) -+ *x = ace; - return TRUE; - } - --- -2.30.1 - diff --git a/patches/ntdll-RtlFirstFreeAce/definition b/patches/ntdll-RtlFirstFreeAce/definition deleted file mode 100644 index 228d0133..00000000 --- a/patches/ntdll-RtlFirstFreeAce/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [50624] Waves Central 12.0.5 fails to start. diff --git a/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch b/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch index 9e8cc8b3..9acaad80 100644 --- a/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch +++ b/patches/ntdll-RtlQueryPackageIdentity/0003-ntdll-tests-Add-basic-tests-for-RtlQueryPackageIdent.patch @@ -1,4 +1,4 @@ -From 109ef0c4769a50904accb044a5d569af8261e305 Mon Sep 17 00:00:00 2001 +From 0e455713af03b7f91fea4332c893390a8de8ca44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 17 Jan 2016 00:50:50 +0100 Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity. @@ -20,7 +20,7 @@ index 90deb5865f8..428ebde23b3 100644 C_SRCS = \ atom.c \ diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c -index aeae4e8adf3..52b06d33b54 100644 +index 2e0bfb650e4..cdb159479f2 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -27,6 +27,9 @@ @@ -53,8 +53,8 @@ index aeae4e8adf3..52b06d33b54 100644 pLdrRegisterDllNotification = (void *)GetProcAddress(hntdll, "LdrRegisterDllNotification"); pLdrUnregisterDllNotification = (void *)GetProcAddress(hntdll, "LdrUnregisterDllNotification"); } -@@ -3682,6 +3691,76 @@ static void test_RtlDestroyHeap(void) - RtlRemoveVectoredExceptionHandler( handler ); +@@ -3730,6 +3739,76 @@ static void test_RtlFirstFreeAce(void) + HeapFree(GetProcessHeap(), 0, acl); } +static void test_RtlQueryPackageIdentity(void) @@ -130,7 +130,7 @@ index aeae4e8adf3..52b06d33b54 100644 START_TEST(rtl) { InitFunctionPtrs(); -@@ -3721,6 +3800,7 @@ START_TEST(rtl) +@@ -3769,6 +3848,7 @@ START_TEST(rtl) test_RtlInitializeCriticalSectionEx(); test_RtlLeaveCriticalSection(); test_LdrEnumerateLoadedModules(); diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 7e487f67..eb2ce3a6 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -146,7 +146,6 @@ patch_enable_all () enable_ntdll_NtQuerySection="$1" enable_ntdll_NtSetLdtEntries="$1" enable_ntdll_ProcessQuotaLimits="$1" - enable_ntdll_RtlFirstFreeAce="$1" enable_ntdll_RtlQueryPackageIdentity="$1" enable_ntdll_Serial_Port_Detection="$1" enable_ntdll_Syscall_Emulation="$1" @@ -461,9 +460,6 @@ patch_enable () ntdll-ProcessQuotaLimits) enable_ntdll_ProcessQuotaLimits="$2" ;; - ntdll-RtlFirstFreeAce) - enable_ntdll_RtlFirstFreeAce="$2" - ;; ntdll-RtlQueryPackageIdentity) enable_ntdll_RtlQueryPackageIdentity="$2" ;; @@ -2359,19 +2355,6 @@ if test "$enable_ntdll_ProcessQuotaLimits" -eq 1; then patch_apply ntdll-ProcessQuotaLimits/0001-ntdll-Add-fake-data-implementation-for-ProcessQuotaL.patch fi -# Patchset ntdll-RtlFirstFreeAce -# | -# | This patchset fixes the following Wine bugs: -# | * [#50624] Waves Central 12.0.5 fails to start. -# | -# | Modified files: -# | * dlls/ntdll/sec.c -# | -if test "$enable_ntdll_RtlFirstFreeAce" -eq 1; then - patch_apply ntdll-RtlFirstFreeAce/0001-ntdll-Check-return-parameter-before-use.patch - patch_apply ntdll-RtlFirstFreeAce/0002-ntdll-RtlFirstFreeAce-only-return-FALSE-on-error.patch -fi - # Patchset ntdll-RtlQueryPackageIdentity # | # | Modified files: diff --git a/staging/upstream-commit b/staging/upstream-commit index beb584ef..5f19b971 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -1113f42aa748d9e0a27c4663b9d8de1237f95e73 +e0d8bd3f5a7b4c8722d3632a9954f1647851f3d3