Module: wine Branch: master Commit: 2a771d294fd7f53dfbb223527549701da971d1df URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a771d294fd7f53dfbb2235275...
Author: Eric Pouech eric.pouech@orange.fr Date: Mon May 12 21:39:53 2008 +0200
winedbg: Fix the path traversal.
---
programs/winedbg/source.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/programs/winedbg/source.c b/programs/winedbg/source.c index 5519c57..72579e0 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); }