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>
This commit is contained in:
parent
e3a7c603e1
commit
d263ba97fb
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue