summaryrefslogtreecommitdiffstats
path: root/Lib/ntpath.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2014-08-31 13:34:09 (GMT)
committerBenjamin Peterson <benjamin@python.org>2014-08-31 13:34:09 (GMT)
commit2ad5421dad86bc95aabe5c77f6034ee6ca699992 (patch)
treebbf0cdb9e99b8913aec6326cc378b96445a11415 /Lib/ntpath.py
parent3f48d394930097724d5eb01499896d52ced4c4fc (diff)
downloadcpython-2ad5421dad86bc95aabe5c77f6034ee6ca699992.zip
cpython-2ad5421dad86bc95aabe5c77f6034ee6ca699992.tar.gz
cpython-2ad5421dad86bc95aabe5c77f6034ee6ca699992.tar.bz2
don't index outside of the path (closes #22312)
Diffstat (limited to 'Lib/ntpath.py')
-rw-r--r--Lib/ntpath.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py
index 228bbb3..fcaf21b 100644
--- a/Lib/ntpath.py
+++ b/Lib/ntpath.py
@@ -113,7 +113,7 @@ def splitdrive(p):
"""
if len(p) > 1:
normp = p.replace(altsep, sep)
- if (normp[0:2] == sep*2) and (normp[2] != sep):
+ if (normp[0:2] == sep*2) and (normp[2:3] != sep):
# is a UNC path:
# vvvvvvvvvvvvvvvvvvvv drive letter or UNC path
# \\machine\mountpoint\directory\etc\...