https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4f9404e600b882141b203…
commit 4f9404e600b882141b20389a49443a45d7c79a70
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Jan 16 21:17:20 2022 +0100
Commit: Thomas Csovcsity <thc.fr13nd(a)gmail.com>
CommitDate: Sun Jun 19 13:06:35 2022 +0200
[WINESYNC] reg: Avoid allocating zero bytes of memory when handling REG_BINARY data.
Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 1dd785d1490f64c33e89003453f7c82292d185d5 by Hugh McMaster
<hugh.mcmaster(a)outlook.com>
---
base/applications/cmdutils/reg/add.c | 2 ++
sdk/tools/winesync/reg.cfg | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/base/applications/cmdutils/reg/add.c b/base/applications/cmdutils/reg/add.c
index cb26c232de3..0236dfb4742 100644
--- a/base/applications/cmdutils/reg/add.c
+++ b/base/applications/cmdutils/reg/add.c
@@ -89,6 +89,8 @@ static BOOL get_regdata(const WCHAR *data, DWORD reg_type, WCHAR
separator,
BYTE hex0, hex1, *ptr;
int i = 0, destByteIndex = 0, datalen = lstrlenW(data);
+ if (!datalen) return TRUE;
+
*size_bytes = ((datalen + datalen % 2) / 2) * sizeof(BYTE);
*data_bytes = malloc(*size_bytes);
diff --git a/sdk/tools/winesync/reg.cfg b/sdk/tools/winesync/reg.cfg
index af6646905bf..0922b41dd80 100644
--- a/sdk/tools/winesync/reg.cfg
+++ b/sdk/tools/winesync/reg.cfg
@@ -4,4 +4,4 @@ directories:
files:
programs/reg/resource.h: base/applications/cmdutils/reg/resource.h
tags:
- wine: e2dfb0aff42153f2c1a25e8c9b37ad10409aca36
+ wine: 1dd785d1490f64c33e89003453f7c82292d185d5