This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: selectmodule.c calls PyInt_AsLong without error checking
Type: Stage:
Components: Library (Lib) Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: luked, nnorwitz
Priority: normal Keywords:

Created on 2005-11-03 01:54 by luked, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg26790 - (view) Author: Luke (luked) Date: 2005-11-03 01:54
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
>>>
msg26791 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2005-11-03 05:11
Logged In: YES 
user_id=33168

Thanks!

Committed revision 41388, 41389. (head)
Committed revision 41390. (2.4)
History
Date User Action Args
2022-04-11 14:56:13adminsetgithub: 42547
2005-11-03 01:54:05lukedcreate