[Patches] [ python-Patches-1118602 ] Fix crash in xmlprase_GetInputContext in pyexpat.c

SourceForge.net noreply at sourceforge.net
Thu Feb 10 00:49:37 CET 2005


Patches item #1118602, was opened at 2005-02-08 14:25
Message generated for change (Settings changed) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1118602&group_id=5470

Category: Modules
Group: None
Status: Open
Resolution: None
>Priority: 7
Submitted By: Mathieu Fenniak (laotzu0)
>Assigned to: Martin v. Löwis (loewis)
Summary: Fix crash in xmlprase_GetInputContext in pyexpat.c

Initial Comment:
I've run across a couple of cases where pyexpat will crash in 
xmlparse_GetInputContext.  The problem stems from the 'offset' 
variable that can be returned from XML_GetInputContext - if it is 
non-zero, then the size being passed into 
PyString_FromStringAndSize is incorrectly too large.  The offset 
should be subtracted from that size.

I cannot provide a test case to reproduce this - my attempts to 
create a minimal test case do not crash.  The application I'm 
developing is using simpleTAL and when a large XML comment 
(multiline Javascript) is entered in the software templates it will 
often crash.  This seems to only occur on a Python installation 
where the module xml.sax.saxlib is not present (i.e. PyXML is not 
installed) - I'm not sure why this is.

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

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


More information about the Patches mailing list