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: lax error-checking in new-in-2.4 marshal stuff
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mwh Nosy List: loewis, mwh
Priority: high Keywords:

Created on 2005-04-11 19:53 by mwh, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg24999 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-04-11 19:53
I realise one of the points of the TYPE_STRINGREF and so on stuff 
was efficiency, but:

>>> marshal.loads('R') # TYPE_STRINGREF == 'R'
Segmentation fault

msg25000 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2005-04-11 21:25
Logged In: YES 
user_id=21627

I agree, and will try to work on a patch before 2.4.2.
msg25001 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-04-13 10:05
Logged In: YES 
user_id=6656

While I have your attention:

>>> marshal.loads("", 1)
Segmentation fault

This is the guilty line:

	if (!PyArg_ParseTuple(args, "s#|i:loads", &s, &n))

there's no pointer corresponding to the optional integer argument.

I'd just fix this, but I have too many local changes to make it easy :(
msg25002 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-06-13 18:29
Logged In: YES 
user_id=6656

This turned out to be easier to fix than I expected, so I fixed it.

Python/marshal.c revision 1.86
Lib/test/test_marshal.py revision 1.12
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41847
2005-04-11 19:53:23mwhcreate