https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b66bb64916ca52853560e…
commit b66bb64916ca52853560e036a717e702c81b30b2
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Fri Sep 11 16:48:57 2020 +0200
Commit: Jérôme Gardou <jerome.gardou(a)reactos.org>
CommitDate: Wed Sep 16 10:35:42 2020 +0200
[WINESYNC] dbghelp: Prevent an invalid memory access when the search path element is
empty.
Signed-off-by: Rémi Bernon <rbernon(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id d263ba97fb7c9ada7ae847909f35cbf5db671216 by Rémi Bernon
<rbernon(a)codeweavers.com>
---
dll/win32/dbghelp/path.c | 1 +
sdk/tools/winesync/dbghelp.cfg | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dll/win32/dbghelp/path.c b/dll/win32/dbghelp/path.c
index a0fc0cf5b17..f8a7f3d890a 100644
--- a/dll/win32/dbghelp/path.c
+++ b/dll/win32/dbghelp/path.c
@@ -229,6 +229,7 @@ static BOOL do_searchW(PCWSTR file, PWSTR buffer, BOOL recurse,
static const WCHAR S_DotDotW[] = {'.','.','\0'};
pos = strlenW(buffer);
+ if (pos == 0) return FALSE;
if (buffer[pos - 1] != '\\') buffer[pos++] = '\\';
strcpyW(buffer + pos, S_AllW);
if ((h = FindFirstFileW(buffer, &fd)) == INVALID_HANDLE_VALUE)
diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg
index f4c28007880..f4c31ed58b9 100644
--- a/sdk/tools/winesync/dbghelp.cfg
+++ b/sdk/tools/winesync/dbghelp.cfg
@@ -4,4 +4,4 @@ files:
include/dbghelp.h: sdk/include/psdk/dbghelp.h
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
tags:
- wine: 9d3687ad324f866c835c4b73922f859a30e47aee
+ wine: d263ba97fb7c9ada7ae847909f35cbf5db671216