mirror of
https://github.com/python/cpython.git
synced 2025-08-21 17:25:34 +00:00
Fix potential crash in path manipulation on windows
This commit is contained in:
parent
9d9fbb4359
commit
a30d8bd653
1 changed files with 1 additions and 1 deletions
|
@ -650,7 +650,7 @@ calculate_path(void)
|
||||||
start of the path in question - even if this
|
start of the path in question - even if this
|
||||||
is one character before the start of the buffer
|
is one character before the start of the buffer
|
||||||
*/
|
*/
|
||||||
while (*look != DELIM && look >= module_search_path)
|
while (look >= module_search_path && *look != DELIM)
|
||||||
look--;
|
look--;
|
||||||
nchars = lookEnd-look;
|
nchars = lookEnd-look;
|
||||||
strncpy(lookBuf, look+1, nchars);
|
strncpy(lookBuf, look+1, nchars);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue