Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
patches: update patches for overwatch 2, wine: update to proton bleed…
Browse files Browse the repository at this point in the history
…ing edge
  • Loading branch information
GloriousEggroll committed Nov 1, 2022
1 parent 2fd5e9c commit 2bf2a3e
Show file tree
Hide file tree
Showing 6 changed files with 413 additions and 30 deletions.
10 changes: 7 additions & 3 deletions patches/protonprep-lutris-staging.sh
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@
patch -Np1 < ../patches/wine-hotfixes/staging/ntdll-DOS_Attributes/0008-ntdll-Always-store-SAMBA_XATTR_DOS_ATTRIB-when-path-.patch

# loader-KeyboardLayouts
patch -Np1 < ../wine-staging/patches/loader-KeyboardLayouts/0001-loader-Add-Keyboard-Layouts-registry-enteries.patch
patch -Np1 < ../wine-staging/patches/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch
patch -Np1 < ../patches/wine-hotfixes/staging/loader-KeyboardLayouts/0001-loader-Add-Keyboard-Layouts-registry-enteries.patch
patch -Np1 < ../patches/wine-hotfixes/staging/loader-KeyboardLayouts/0002-user32-Improve-GetKeyboardLayoutList.patch

# ntdll-ApiSetMap
patch -Np1 < ../wine-staging/patches/ntdll-ApiSetMap/0001-ntdll-Add-dummy-apiset-to-PEB.patch
Expand Down Expand Up @@ -350,7 +350,6 @@

# https://bugs.winehq.org/show_bug.cgi?id=52956
echo "WINE: -HOTFIX- fix star citizen bug 52956"
patch -Np1 < ../patches/wine-hotfixes/upstream/15aa8c6-fix-star-citizen-bug-52956.patch
patch -Np1 < ../patches/wine-hotfixes/pending/0001-winex11.drv-Define-ControlMask-when-not-available.patch
patch -Np1 < ../patches/wine-hotfixes/pending/0002-include-Add-THREAD_POWER_THROTTLING_STATE-type.patch
patch -Np1 < ../patches/wine-hotfixes/pending/0003-ntdll-Fake-success-for-ThreadPowerThrottlingState.patch
Expand Down Expand Up @@ -380,6 +379,11 @@
echo "WINE: -HOTFIX- fix Overwatch 2 shader compilation issue"
# https://gitlab.winehq.org/wine/wine/-/merge_requests/1152
patch -Np1 < ../patches/wine-hotfixes/pending/1152.patch

echo "WINE: -HOTFIX- fix Overwatch 2 from freezing on wine 7.12 and older"
# https://gitlab.winehq.org/wine/wine/-/merge_requests/1152
patch -Np1 < ../patches/wine-hotfixes/pending/4bf9d2403f269e7f3595ad075a4afee9adbda51f.patch


### END WINE HOTFIX SECTION ###

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
From 4bf9d2403f269e7f3595ad075a4afee9adbda51f Mon Sep 17 00:00:00 2001
From: Alexandre Julliard <[email protected]>
Date: Wed, 6 Jul 2022 12:46:50 +0200
Subject: [PATCH] ntdll: Fix the return value of NtQueryKey for a short buffer.

Signed-off-by: Alexandre Julliard <[email protected]>
---
dlls/ntdll/unix/registry.c | 8 ++------
2 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/dlls/ntdll/unix/registry.c b/dlls/ntdll/unix/registry.c
index 9c98bf48399f..428f8c9eb3ce 100644
--- a/dlls/ntdll/unix/registry.c
+++ b/dlls/ntdll/unix/registry.c
@@ -268,7 +268,6 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
case KeyBasicInformation:
{
KEY_BASIC_INFORMATION keyinfo;
- fixed_size = (char *)keyinfo.Name - (char *)&keyinfo;
keyinfo.LastWriteTime.QuadPart = reply->modif;
keyinfo.TitleIndex = 0;
keyinfo.NameLength = reply->namelen;
@@ -279,7 +278,6 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
case KeyFullInformation:
{
KEY_FULL_INFORMATION keyinfo;
- fixed_size = (char *)keyinfo.Class - (char *)&keyinfo;
keyinfo.LastWriteTime.QuadPart = reply->modif;
keyinfo.TitleIndex = 0;
keyinfo.ClassLength = wine_server_reply_size(reply);
@@ -297,7 +295,6 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
case KeyNodeInformation:
{
KEY_NODE_INFORMATION keyinfo;
- fixed_size = (char *)keyinfo.Name - (char *)&keyinfo;
keyinfo.LastWriteTime.QuadPart = reply->modif;
keyinfo.TitleIndex = 0;
if (reply->namelen < wine_server_reply_size(reply))
@@ -318,7 +315,6 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
case KeyNameInformation:
{
KEY_NAME_INFORMATION keyinfo;
- fixed_size = (char *)keyinfo.Name - (char *)&keyinfo;
keyinfo.NameLength = reply->namelen;
memcpy( info, &keyinfo, min( length, fixed_size ) );
break;
@@ -327,7 +323,6 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
case KeyCachedInformation:
{
KEY_CACHED_INFORMATION keyinfo;
- fixed_size = sizeof(keyinfo);
keyinfo.LastWriteTime.QuadPart = reply->modif;
keyinfo.TitleIndex = 0;
keyinfo.SubKeys = reply->subkeys;
@@ -344,7 +339,8 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
break;
}
*result_len = fixed_size + reply->total;
- if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW;
+ if (length < fixed_size) ret = STATUS_BUFFER_TOO_SMALL;
+ else if (length < *result_len) ret = STATUS_BUFFER_OVERFLOW;
}
}
SERVER_END_REQ;
Loading

0 comments on commit 2bf2a3e

Please sign in to comment.