Commit d263ba97 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

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

parent e3a7c603
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment