From: Kristján Valur Jónsson Date: Fri, 13 Apr 2007 22:20:13 +0000 (+0000) Subject: Fix potential crash in path manipulation on windows X-Git-Tag: v2.6a1~1837 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=019fcbc2e8083d02b3b2ddb4ae40a861027bdbac;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);