Mercurial > cpython-lru_cache-weakref
diff PC/getpathp.c @ 41460:ea3ca495f321 legacy-trunk
Fix potential crash in path manipulation on windows
| author | Kristján Valur Jónsson <kristjan@ccpgames.com> |
|---|---|
| date | Fri, 13 Apr 2007 22:20:13 +0000 |
| parents | a4fc4e752634 |
| children | bc75c523b9d8 2adf9ed6ba7e |
line wrap: on
line diff
--- a/PC/getpathp.c Fri Apr 13 22:07:33 2007 +0000 +++ b/PC/getpathp.c Fri Apr 13 22:20:13 2007 +0000 @@ -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);
