Bugs item #1461783, was opened at 2006-03-31 00:50
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1461783&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: splitscreen (splitscreen)
Assigned to: Nobody/Anonymous (nobody)
Summary: Invalid modes crash open()

Initial Comment:
The 2.5a0 interpreter can be crashed by opening a file
with an invalid mode, i.e

open("bogus", "bogus")

results in the Microsoft Visual C++ Debug Library
spewing an "assertion failed" message with the expression

("Invalid file open mode", 0) 

in the file _open.c, line 98.

Attached is a very rough patch that raises and IOError
if the open mode doesn't begin with an 'a', 'w' or 'r'
on the Windows platform. 

If this is something wrong at my end (and I feel it may
be) please let me know. I'd be happy to offer any more
information.

BTW, I'm using Microsoft Visual Studio 2005.

Thanks,
Matt

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1461783&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to