Added patch to mark RegOpenKeyExA, RegCloseKey and RegQueryValueExA as hotpatchable.

This commit is contained in:
Sebastian Lackner 2015-10-02 17:48:08 +02:00
parent eb98f4e74f
commit 3cee0925e8
5 changed files with 79 additions and 1 deletions

View File

@ -34,7 +34,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 [12]:**
**Bug fixes and features included in the next upcoming release [13]:**
* Add implementation for msidb commandline tool
* Codepage conversion should fail when destination length is < 0
@ -47,6 +47,7 @@ Included bug fixes and improvements
* Protect TVM_GETITEM from invalid item pointers ([Wine Bug #33001](https://bugs.winehq.org/show_bug.cgi?id=33001))
* Reduce stack usage of virtual memory functions ([Wine Bug #34558](https://bugs.winehq.org/show_bug.cgi?id=34558))
* Refresh MDI menus when DefMDIChildProc(WM_SETTEXT) is called ([Wine Bug #21855](https://bugs.winehq.org/show_bug.cgi?id=21855))
* RegOpenKeyExA, RegCloseKey and RegQueryValueExA should be hotpatchable
* Return STATUS_INVALID_DEVICE_REQUEST when trying to call NtReadFile on directory

2
debian/changelog vendored
View File

@ -22,6 +22,8 @@ wine-staging (1.7.52) UNRELEASED; urgency=low
IDirectInput8::Initialize.
* Added patch to pass cookie by reference to msvcrt_local_unwind4 in
_seh_longjmp_unwind4.
* Added patch to mark RegOpenKeyExA, RegCloseKey and RegQueryValueExA as
hotpatchable.
* Removed patch to fix possible memory leak in netprofm init_networks (fixed
upstream).
* Removed patch for stub of dwmapi.DwmUpdateThumbnailProperties (accepted

View File

@ -0,0 +1,58 @@
From bca490fc6eff140415ea68354a1458635be8522b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 2 Oct 2015 17:25:56 +0200
Subject: advapi32: Mark some functions as hotpatchable.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Michael Müller <michael@fds-team.de>
---
dlls/advapi32/registry.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index 2482b85..f988c0e 100644
--- a/dlls/advapi32/registry.c
+++ b/dlls/advapi32/registry.c
@@ -23,6 +23,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
+#include "config.h"
+
#include <stdlib.h>
#include <stdarg.h>
#include <stdio.h>
@@ -522,7 +524,7 @@ LSTATUS WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD options, REGSAM acc
* Unlike RegCreateKeyExA(), this function will not create the key if it
* does not exist.
*/
-LSTATUS WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD options, REGSAM access, PHKEY retkey )
+LSTATUS WINAPI DECLSPEC_HOTPATCH RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD options, REGSAM access, PHKEY retkey )
{
OBJECT_ATTRIBUTES attr;
STRING nameA;
@@ -1107,7 +1109,7 @@ LSTATUS WINAPI RegQueryInfoKeyA( HKEY hkey, LPSTR class, LPDWORD class_len, LPDW
* Success: ERROR_SUCCESS
* Failure: Error code
*/
-LSTATUS WINAPI RegCloseKey( HKEY hkey )
+LSTATUS WINAPI DECLSPEC_HOTPATCH RegCloseKey( HKEY hkey )
{
if (!hkey) return ERROR_INVALID_HANDLE;
if (hkey >= (HKEY)0x80000000) return ERROR_SUCCESS;
@@ -1477,8 +1479,8 @@ LSTATUS WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDW
* MSDN states that if data is too small it is partially filled. In reality
* it remains untouched.
*/
-LSTATUS WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD type,
- LPBYTE data, LPDWORD count )
+LSTATUS WINAPI DECLSPEC_HOTPATCH RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved,
+ LPDWORD type, LPBYTE data, LPDWORD count )
{
NTSTATUS status;
ANSI_STRING nameA;
--
2.5.1

View File

@ -0,0 +1 @@
Fixes: RegOpenKeyExA, RegCloseKey and RegQueryValueExA should be hotpatchable

View File

@ -86,6 +86,7 @@ patch_enable_all ()
enable_Exagear="$1"
enable_Pipelight="$1"
enable_Staging="$1"
enable_advapi32_Hotpatching="$1"
enable_advapi32_LsaLookupSids="$1"
enable_advpack_LaunchINFSection="$1"
enable_amstream_GetMultiMediaStream="$1"
@ -353,6 +354,9 @@ patch_enable ()
Staging)
enable_Staging="$2"
;;
advapi32-Hotpatching)
enable_advapi32_Hotpatching="$2"
;;
advapi32-LsaLookupSids)
enable_advapi32_LsaLookupSids="$2"
;;
@ -2180,6 +2184,18 @@ if test "$enable_Staging" -eq 1; then
) >> "$patchlist"
fi
# Patchset advapi32-Hotpatching
# |
# | Modified files:
# | * dlls/advapi32/registry.c
# |
if test "$enable_advapi32_Hotpatching" -eq 1; then
patch_apply advapi32-Hotpatching/0001-advapi32-Mark-some-functions-as-hotpatchable.patch
(
echo '+ { "Michael Müller", "advapi32: Mark some functions as hotpatchable.", 1 },';
) >> "$patchlist"
fi
# Patchset server-CreateProcess_ACLs
# |
# | This patchset fixes the following Wine bugs: