[PATCH] [WineDbg]: fix the path traversal
Eric Pouech
eric.pouech at orange.fr
Mon May 12 14:39:53 CDT 2008
A+
---
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-patches
mailing list