Issue 22312: ntpath.splitdrive('//') -> IndexError (original) (raw)

Issue22312

Created on 2014-08-31 10:14 by arigo, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (4)
msg226163 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2014-08-31 10:14
Calling Python 2.7's new version of ntpath.splitdrive() with argument either '//' or r'\\' results in an IndexError: string index out of range.
msg226170 - (view) Author: Armin Rigo (arigo) * (Python committer) Date: 2014-08-31 10:54
For completeness: Python 2.7.6: ntpath.splitdrive('//') => ('', '//') Python 2.7.8: ntpath.splitdrive('//') => IndexError
msg226178 - (view) Author: Eryk Sun (eryksun) * (Python triager) Date: 2014-08-31 13:31
Line 116 should use normp[2:3] instead of normp[2]. http://hg.python.org/cpython/file/ee879c0ffa11/Lib/ntpath.py#l92
msg226179 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-08-31 13:34
New changeset 446d4dfcc220 by Benjamin Peterson in branch '2.7': don't index outside of the path (closes #22312) http://hg.python.org/cpython/rev/446d4dfcc220
History
Date User Action Args
2022-04-11 14:58:07 admin set github: 66508
2014-08-31 13:34:24 python-dev set status: open -> closednosy: + python-devmessages: + resolution: fixedstage: resolved
2014-08-31 13:31:10 eryksun set nosy: + eryksunmessages: +
2014-08-31 10:54:46 arigo set messages: +
2014-08-31 10:14:02 arigo create