[Expat-discuss] core dump with namespaces and external entities

Karl Waclawek karl@waclawek.net
Mon, 30 Sep 2002 11:34:58 -0400


This is a multi-part message in MIME format.

---------------------- multipart/mixed attachment
> > Attached is a little python script which causes a segfault on my machine.  I 
> > have narrowed the problem down to the xmlns attribute defined in the DTD.  It 
> > only dumps core if, in the DTD, the name is 'xmlns'.  Any other name works 
> > fine.
> > 
> > I've tested this with expat 1.95.2 and 1.95.4 using pyexpat from python 2.2.1 
> > and with 1.95.5 using PyXML from CVS.
> 
> I extracted the files from your script and tested with a completely
> different application and got the same result, a NULL pointer exception.
> 
> Please file a bug report. I will see if I can dig into it this weekend.

I had some time and came up with a patch.
This patch is fairly big, because I had to change
parser->m_dtd to a separately allocated structure.
That in itself can - of course - introduce new bugs.

Let's hope not.
Anyway, please test the attached patch.
You need to apply the diff against xmlparse.c rev. 1.89 from CVS.

Karl
---------------------- multipart/mixed attachment
A non-text attachment was scrubbed...
Name: Patch.zip
Type: application/x-zip-compressed
Size: 14983 bytes
Desc: not available
Url : http://mail.libexpat.org/pipermail-21/expat-discuss/attachments/20020930/8c68be2a/Patch.bin

---------------------- multipart/mixed attachment--