mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 18:52:57 +00:00
[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:
parent
5e225d76e5
commit
b66bb64916
2 changed files with 2 additions and 1 deletions
|
@ -229,6 +229,7 @@ static BOOL do_searchW(PCWSTR file, PWSTR buffer, BOOL recurse,
|
||||||
static const WCHAR S_DotDotW[] = {'.','.','\0'};
|
static const WCHAR S_DotDotW[] = {'.','.','\0'};
|
||||||
|
|
||||||
pos = strlenW(buffer);
|
pos = strlenW(buffer);
|
||||||
|
if (pos == 0) return FALSE;
|
||||||
if (buffer[pos - 1] != '\\') buffer[pos++] = '\\';
|
if (buffer[pos - 1] != '\\') buffer[pos++] = '\\';
|
||||||
strcpyW(buffer + pos, S_AllW);
|
strcpyW(buffer + pos, S_AllW);
|
||||||
if ((h = FindFirstFileW(buffer, &fd)) == INVALID_HANDLE_VALUE)
|
if ((h = FindFirstFileW(buffer, &fd)) == INVALID_HANDLE_VALUE)
|
||||||
|
|
|
@ -4,4 +4,4 @@ files:
|
||||||
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
||||||
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
||||||
tags:
|
tags:
|
||||||
wine: 9d3687ad324f866c835c4b73922f859a30e47aee
|
wine: d263ba97fb7c9ada7ae847909f35cbf5db671216
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue