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



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

In my case, code analogous to the one in example 'reader3.c' makes
'xmlFreeTextReader' crash when I use long patterns, e.g. 
/ISUBusinessPartner/ISUAccounts/ISUAccount/ISUContracts/ISUContract/ISUI
nstallation/ISUMeterReaders/ISUMeterReader/SerialId
(shorter patterns work).
[...]
Accessing comp->steps[10] is not allowed and leads to a crash in
xmlFree. 

  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

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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