[Python-checkins] r54815 - python/branches/release25-maint/PC/getpathp.c

kristjan.jonsson python-checkins at python.org
Sat Apr 14 00:21:07 CEST 2007


Author: kristjan.jonsson
Date: Sat Apr 14 00:21:07 2007
New Revision: 54815

Modified:
   python/branches/release25-maint/PC/getpathp.c
Log:
Fix potential crash in path manipulation on windows

Modified: python/branches/release25-maint/PC/getpathp.c
==============================================================================
--- python/branches/release25-maint/PC/getpathp.c	(original)
+++ python/branches/release25-maint/PC/getpathp.c	Sat Apr 14 00:21:07 2007
@@ -650,7 +650,7 @@
 			   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);


More information about the Python-checkins mailing list