Re: [xml] Long patterns with xmlTextReaderPreservePattern make xmlFreeTextReader crash

On Wed, Jan 12, 2005 at 08:09:12PM +0100, Patrick Streule wrote:

In my case, code analogous to the one in example 'reader3.c' makes
'xmlFreeTextReader' crash when I use long patterns, e.g. 
(shorter patterns work).
Accessing comp->steps[10] is not allowed and leads to a crash in

  yeah this is a stupid bug in that module, I used a fixed size initially
for developping that code, and failed to fix that problem.

    /* TODO fix the statically allocated size steps[] */
    int nbStep;
    int maxStep;
    xmlStepOp steps[10];        /* ops for computation */

I am still using libxml2 version 2.6.5, but the above mentioned code
doesn't seem to have changed in 2.6.16. Is there a way to check this
condition beforehand? Or to set the limit higher?

 The fix is in CVS now, 

   thanks for the report !


Daniel Veillard      | Red Hat Desktop team
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]