List Info

Thread: xmlschemas.c - segmentation fault




xmlschemas.c - segmentation fault
user name
2006-08-07 10:23:26
Hello,

libxml2 2.6.26

It seems that there is a bug in the xmlschemas.c file. The
function 
xmlSchemaClearValidCtxt clears a xmlSchemaValidCtxt object
without 
setting the nbIdcNodes member to 0. When the context is used
a second 
time, some IDC nodes are cleared twice.

Attached is a proposed patch.

Regards,
Bertrand.

*** ./libxml2-2.6.26/xmlschemas.c	2006-05-31
15:12:45.000000000 +0200
--- ./libxml2-2.6.26/xmlschemas-patch.c	2006-08-07
12:10:39.000000000 +0200
***************
*** 27171,27176 ****
--- 27171,27178 ----
  	}
  	xmlFree(vctxt->idcNodes);
  	vctxt->idcNodes = NULL;
+ 	vctxt->nbIdcNodes = 0;
+ 
      }
      /*
      * Note that we won't delete the XPath state pool
here.
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
xmlschemas.c - segmentation fault
user name
2006-08-07 10:41:45
On Monday 07 August 2006 10:23, Bertrand Fritsch wrote:
> Hello,
>
> libxml2 2.6.26
>
> It seems that there is a bug in the xmlschemas.c file.
The function
> xmlSchemaClearValidCtxt clears a xmlSchemaValidCtxt
object without
> setting the nbIdcNodes member to 0. When the context is
used a second
> time, some IDC nodes are cleared twice.
>
> Attached is a proposed patch.

Perhaps it affects this one? http
://bugzilla.gnome.org/show_bug.cgi?id=350247


Cheers,

		Frans
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
xmlschemas.c - segmentation fault
user name
2006-08-07 10:33:09
Frans Englich wrote:
> On Monday 07 August 2006 10:23, Bertrand Fritsch wrote:
>   
>> Hello,
>>
>> libxml2 2.6.26
>>
>> It seems that there is a bug in the xmlschemas.c
file. The function
>> xmlSchemaClearValidCtxt clears a xmlSchemaValidCtxt
object without
>> setting the nbIdcNodes member to 0. When the
context is used a second
>> time, some IDC nodes are cleared twice.
>>
>> Attached is a proposed patch.
>>     
>
> Perhaps it affects this one? http
://bugzilla.gnome.org/show_bug.cgi?id=350247
>
>
>   
I'm not sure. To reproduce the issue that I reported, you
have to valid 
at least two documents with the same schema context...

Bertrand.
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
xmlschemas.c - segmentation fault
user name
2006-08-07 11:02:31
On Mon, Aug 07, 2006 at 12:23:26PM +0200, Bertrand Fritsch
wrote:
> Hello,
> 
> libxml2 2.6.26
> 
> It seems that there is a bug in the xmlschemas.c file.
The function 
> xmlSchemaClearValidCtxt clears a xmlSchemaValidCtxt
object without 
> setting the nbIdcNodes member to 0. When the context is
used a second 
> time, some IDC nodes are cleared twice.
> 
> Attached is a proposed patch.

  Okay, that looks logical, applied and commited.

   thanks !

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillardredhat.com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ |
Rpmfind RPM search engine http://rpmfind.net/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xmlgnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )