classification
Title: Check PyInt_AsSsize_t/PyLong_AsSsize_t error
Type: Stage:
Components: Library (Lib) Versions: Python 3.0, Python 2.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: benjamin.peterson Nosy List: amaury.forgeotdarc, benjamin.peterson, haypo
Priority: high Keywords: patch

Created on 2008-09-26 17:36 by haypo, last changed 2008-09-30 02:22 by benjamin.peterson. This issue is now closed.

Files
File name Uploaded Description Edit
py3k_bytes_stringio.patch haypo, 2008-09-26 17:36 Catch PyLong_Ssize_t error in _bytesio/_stringio.c
py3k_struct.patch haypo, 2008-09-26 17:43 Fix s_pack_into()
py26_bytesio.patch haypo, 2008-09-26 17:44 Catch PyLong_Ssize_t error in _bytesio (python trunk)
py26_struct.patch haypo, 2008-09-26 17:46 Catch PyLong_Ssize_t error in _struct (python trunk)
Messages (6)
msg73868 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2008-09-26 17:36
PyLong_Ssize_t() returns -1 and set an error (OverflowError) on
overflow, but some modules don't check this case. Here is a first patch
for BytesIO() and StringIO().
msg73870 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2008-09-26 17:43
Here is a fix for struct.pack_into().
msg73871 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2008-09-26 17:44
Fix _bytesio of Python 2.6.
msg73872 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2008-09-26 17:46
py3k_struct.patch can be ported to python trunk: so here is the fix for
python trunk (2.6).
msg74023 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2008-09-29 11:23
All these patches seem good to me.
msg74064 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2008-09-30 02:22
Thanks for the patches. Fixed in r66693, r66694, and r66695.
History
Date User Action Args
2008-09-30 02:22:25benjamin.petersonsetstatus: open -> closed
resolution: fixed
messages: + msg74064
2008-09-29 21:30:50benjamin.petersonsetassignee: benjamin.peterson
nosy: + benjamin.peterson
2008-09-29 11:23:27amaury.forgeotdarcsetpriority: high
nosy: + amaury.forgeotdarc
messages: + msg74023
2008-09-26 17:46:21hayposetfiles: + py26_struct.patch
messages: + msg73872
2008-09-26 17:44:24hayposetfiles: + py26_bytesio.patch
messages: + msg73871
2008-09-26 17:43:34hayposetfiles: + py3k_struct.patch
messages: + msg73870
2008-09-26 17:36:02haypocreate