From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Tue Sep 26 2000 - 17:32:11 EDT
On Tue, Sep 26, 2000 at 01:49:42PM -0700, Joe McAlerney wrote:
>
> Hello,
>
> After upgrading from 2.2.2 to 2.2.3, I found that my DOM application was
> halting when it called xmlParseDTD.
> Here is the way I call it:
>
> dtd = xmlParseDTD("example.dtd","example.dtd");
>
> Please bare with me as I drag you through my thinking/debugging process.
>
> The specific place it halts, is buried down in resolveEntity() in the
> file SAX.c. xmlParseDTD calls xmlSAXParseDTD, which initializes a new
> xmlParserCtxt, and passes it's userdata ptr into resolveEntity, along
> with my ExternalID and SystemID.
>
> The new version of resolveEntity() attempts to extract a base value from
> the newly initialized xmlParserCtxt value, but can't because there is
> nothing to extract. As a result, a NULL value is passed into
> xmlBuildURI, and a NULL value is returned. Unfortunately, that value is
Hum right I understand, this is a serious problem.
At that point the following should be called
xmlBuildURI("example.dtd", NULL);
right ?
xmlBuildURI() starts with:
if ((URI == NULL) && (base == NULL))
return(NULL);
if (URI == NULL)
return((xmlChar *) xmlMemStrdup((const char *) base));
a simple fix is to add:
if (base == NULL)
return((xmlChar *) xmlMemStrdup((const char *) URI);
Could you check taht this solves the problem (i.e. that it was correctly
analyzed)? thanks.
But I dislike the fact that the URI (and the base in the previous case)
are not parsed to check that their content is a valid URI ...
I will try to add this test ...
Daniel
-- Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes | Today's Bookmarks : Tel : +33 476 615 257 | 655, avenue de l'Europe | Linux XML libxml WWW Fax : +33 476 615 207 | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind http://www.w3.org/People/all#veillard%40w3.org | RPM badminton Kaffe ---- Message from the list xml@rpmfind.net Archived at : http://xmlsoft.org/messages/ to unsubscribe: echo "unsubscribe xml" | mail majordomo@rpmfind.net
This archive was generated by hypermail 2b29 : Tue Sep 26 2000 - 17:43:32 EDT