You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to avoid appending duplicate NULL character when importing keys with regedit.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
From ec88679b1ecd54f40dccaf374ca21bb96441a18a Mon Sep 17 00:00:00 2001
|
||||
From: Jiaxing Wang <hello.wjx@gmail.com>
|
||||
Date: Thu, 20 Nov 2014 15:29:07 +0800
|
||||
Subject: regedit: Avoid appending '\0' to string value of imported key.
|
||||
|
||||
After importing, string values are appended with '\0'.
|
||||
For example, importing:
|
||||
|
||||
[HKEY_LOCAL_MACHINE\testkey]
|
||||
"value"="abc"
|
||||
|
||||
gets
|
||||
|
||||
[HKEY_LOCAL_MACHINE\testkey]
|
||||
"value"="abc\0"
|
||||
|
||||
This is because the null character after last quote is included
|
||||
which is not needed as the last quote has been changed to '\0' and
|
||||
dwLen already include the last quote.
|
||||
---
|
||||
programs/regedit/regproc.c | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
|
||||
index 80beb21..643b559 100644
|
||||
--- a/programs/regedit/regproc.c
|
||||
+++ b/programs/regedit/regproc.c
|
||||
@@ -376,7 +376,6 @@ static LONG setValue(WCHAR* val_name, WCHAR* val_data, BOOL is_unicode)
|
||||
return ERROR_INVALID_DATA;
|
||||
val_data[dwLen-1] = '\0'; /* remove last quotes */
|
||||
lpbData = (BYTE*) val_data;
|
||||
- dwLen++; /* include terminating null */
|
||||
dwLen = dwLen * sizeof(WCHAR); /* size is in bytes */
|
||||
}
|
||||
else if (dwParseType == REG_DWORD) /* Convert the dword types */
|
||||
--
|
||||
2.2.1
|
||||
|
1
patches/regedit-String_Termination/definition
Normal file
1
patches/regedit-String_Termination/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [37575] Do not append duplicate NULL characters when importing keys with regedit
|
Reference in New Issue
Block a user