[Patches] [ python-Patches-1357836 ] potential crash and free memory read

SourceForge.net noreply at sourceforge.net
Fri Jun 2 08:23:52 CEST 2006


Patches item #1357836, was opened at 2005-11-15 21:26
Message generated for change (Comment added) made by nnorwitz
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1357836&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: Core (C code)
Group: Python 2.4
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Neal Norwitz (nnorwitz)
Assigned to: Martin v. Löwis (loewis)
Summary: potential crash and free memory read

Initial Comment:
Martin,

I think this problem came about from the work on PEP
263 (coding spec).  Attached is a patch that corrects a
free memory write.  The problem shows up with valgrind
and test_coding IIRC.

There is a XXX comment in the code which points to
another problem.  It's possible that you could break
and not do a strcpy().  Or perhaps decoding_fgets()
shouldn't call error_ret().  I'm not sure if
error_ret() should free the buffer ever.  I think that
would be my preference.  That way we can deallocate it
where we allocate it.  I think I plugged all the other
leaks.

Let me know what you think.


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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2006-06-01 23:23

Message:
Logged In: YES 
user_id=33168

Someone already fixed the XXX comment.  Apply the rest of
the patch.  This should be backported to 2.4.

Committed revision 46602.


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

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


More information about the Patches mailing list