Eric Pouech : winedbg: Fix the path traversal.
Alexandre Julliard
julliard at winehq.org
Tue May 13 04:39:45 CDT 2008
Module: wine
Branch: master
Commit: 2a771d294fd7f53dfbb223527549701da971d1df
URL: http://source.winehq.org/git/wine.git/?a=commit;h=2a771d294fd7f53dfbb223527549701da971d1df
Author: Eric Pouech <eric.pouech at 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);
}
More information about the wine-cvs
mailing list