[Python-bugs-list] [ python-Bugs-500705 ] os.listdir("") bug on Windows

noreply@sourceforge.net noreply@sourceforge.net
Mon, 07 Jan 2002 19:28:21 -0800


Bugs item #500705, was opened at 2002-01-07 19:28
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=500705&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Neil Hodgson (nyamatongwe)
Assigned to: Nobody/Anonymous (nobody)
Summary: os.listdir("") bug on Windows

Initial Comment:
   There is an out-of-bounds error on Windows when 
using os.listdir("") which could result in 
indeterminate behaviour. After parsing the args, it
does
 ch = namebuf[len-1];
   which indexes before the array as len = 0.
   Possibly change this to
 ch = (len > 0) ? namebuf[len-1] : '\0';


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=500705&group_id=5470