From: Kristján Valur Jónsson Date: Fri, 13 Apr 2007 22:21:07 +0000 (+0000) Subject: Fix potential crash in path manipulation on windows X-Git-Tag: v2.5.1~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a30d8bd6535528b81dfcf1e91880a58cb8c8841d;p=thirdparty%2FPython%2Fcpython.git Fix potential crash in path manipulation on windows --- diff --git a/PC/getpathp.c b/PC/getpathp.c index 729d2e4736bb..e62b936f2d36 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -650,7 +650,7 @@ calculate_path(void) start of the path in question - even if this is one character before the start of the buffer */ - while (*look != DELIM && look >= module_search_path) + while (look >= module_search_path && *look != DELIM) look--; nchars = lookEnd-look; strncpy(lookBuf, look+1, nchars);