Issue 1346547: _subprocess.c calls PyInt_AsLong without error checking (original) (raw)
_subprocess.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.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.
import subprocess si = subprocess.STARTUPINFO() si.wShowWindow = 2**65 obj = subprocess.Popen('notepad.exe', startupinfo=si) 1+1 OverflowError: long int too large to convert to int