summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristján Valur Jónsson <kristjan@ccpgames.com>2007-04-13 22:21:07 (GMT)
committerKristján Valur Jónsson <kristjan@ccpgames.com>2007-04-13 22:21:07 (GMT)
commita30d8bd6535528b81dfcf1e91880a58cb8c8841d (patch)
tree74ed589a6be8496ae5c38885cb25b944efe026c7
parent9d9fbb435935503b9fbd2754c2d8745d6239229a (diff)
downloadcpython-a30d8bd6535528b81dfcf1e91880a58cb8c8841d.zip
cpython-a30d8bd6535528b81dfcf1e91880a58cb8c8841d.tar.gz
cpython-a30d8bd6535528b81dfcf1e91880a58cb8c8841d.tar.bz2
Fix potential crash in path manipulation on windows
-rw-r--r--PC/getpathp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c
index 729d2e4..e62b936 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);