[ python-Bugs-1180997 ] lax error-checking in new-in-2.4 marshal stuff

SourceForge.net noreply at sourceforge.net
Mon Jun 13 20:29:42 CEST 2005


Bugs item #1180997, was opened at 2005-04-11 20:53
Message generated for change (Comment added) made by mwh
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1180997&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 Interpreter Core
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 7
Submitted By: Michael Hudson (mwh)
>Assigned to: Michael Hudson (mwh)
Summary: lax error-checking in new-in-2.4 marshal stuff

Initial Comment:
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



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

>Comment By: Michael Hudson (mwh)
Date: 2005-06-13 19:29

Message:
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

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

Comment By: Michael Hudson (mwh)
Date: 2005-04-13 11:05

Message:
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 :(

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

Comment By: Martin v. Löwis (loewis)
Date: 2005-04-11 22:25

Message:
Logged In: YES 
user_id=21627

I agree, and will try to work on a patch before 2.4.2.

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

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


More information about the Python-bugs-list mailing list