[Python-bugs-list] [Bug #125452] shlex.shlex hangs when parsing an unclosed quoted string

noreply@sourceforge.net noreply@sourceforge.net
Tue, 12 Dec 2000 05:23:47 -0800


Bug #125452, was updated on 2000-Dec-11 23:12
Here is a current snapshot of the bug.

Project: Python
Category: Library
Status: Open
Resolution: None
Bug Group: None
Priority: 5
Submitted by: nobody
Assigned to : esr
Summary: shlex.shlex hangs when parsing an unclosed quoted string

Details: import StringIO
import shlex

s = shlex.shlex(StringIO.StringIO("hello 'world"))

you'll see that get_token doesn't test for EOF when it's
in the ' state.  Just adding that test should fix the
problem.

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=125452&group_id=5470