From 2a771d294fd7f53dfbb223527549701da971d1df Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 12 May 2008 21:39:53 +0200 Subject: [PATCH] winedbg: Fix the path traversal. --- programs/winedbg/source.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/programs/winedbg/source.c b/programs/winedbg/source.c index 5519c57a595..72579e03490 100644 --- a/programs/winedbg/source.c +++ b/programs/winedbg/source.c @@ -127,9 +127,8 @@ static BOOL source_locate_file(const char* srcfile, char* path) spath = srcfile; while (!found) { - spath = strchr(spath, '\\'); - if (!spath) spath = strchr(spath, '/'); - if (!spath) break; + while (*spath && *spath != '/' && *spath != '\\') spath++; + if (!*spath) break; spath++; found = SearchPathA(dbg_curr_process->search_path, spath, NULL, MAX_PATH, path, NULL); } -- 2.11.4.GIT