[ python-Bugs-1346533 ] selectmodule.c calls PyInt_AsLong without error checking

SourceForge.net noreply at sourceforge.net
Thu Nov 3 02:54:06 CET 2005


Bugs item #1346533, was opened at 2005-11-03 12:54
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=1346533&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 Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Luke (luked)
Assigned to: Nobody/Anonymous (nobody)
Summary: selectmodule.c calls PyInt_AsLong without error checking

Initial Comment:
selectmodule.c calls PyInt_AsLong without checking
whether the conversion produced an error.
This bug can cause an error to be reported at the wrong
point, eg:

Python 2.4.2 (#1, Nov  3 2005, 12:41:57)
[GCC 3.4.3-20050110 (Gentoo Linux 3.4.3.20050110,
ssp-3.4.3.20050110-0, pie-8.7 on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import select
>>> p = select.poll()
>>> p.register(0) # stdin
>>> p.poll(0x100000000)
[(0, 4)]
>>> 2 + 3
OverflowError: long int too large to convert to int
>>>


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

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


More information about the Python-bugs-list mailing list