winedbg: Fix the path traversal.
This commit is contained in:
parent
140c0423f5
commit
2a771d294f
|
@ -127,9 +127,8 @@ static BOOL source_locate_file(const char* srcfile, char* path)
|
||||||
spath = srcfile;
|
spath = srcfile;
|
||||||
while (!found)
|
while (!found)
|
||||||
{
|
{
|
||||||
spath = strchr(spath, '\\');
|
while (*spath && *spath != '/' && *spath != '\\') spath++;
|
||||||
if (!spath) spath = strchr(spath, '/');
|
if (!*spath) break;
|
||||||
if (!spath) break;
|
|
||||||
spath++;
|
spath++;
|
||||||
found = SearchPathA(dbg_curr_process->search_path, spath, NULL, MAX_PATH, path, NULL);
|
found = SearchPathA(dbg_curr_process->search_path, spath, NULL, MAX_PATH, path, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue