[WINESYNC] dbghelp: Prevent an invalid memory access when the search path element is empty.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id d263ba97fb7c9ada7ae847909f35cbf5db671216 by Rémi Bernon <rbernon@codeweavers.com>
This commit is contained in:
winesync 2020-09-11 16:48:57 +02:00 committed by Jérôme Gardou
parent 5e225d76e5
commit b66bb64916
2 changed files with 2 additions and 1 deletions

View file

@ -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)

View file

@ -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