[xml] Heap Memory exhausts



Hi

 

Below mentioned xml file is parsed using xmlRecoverFile () as it’s not welformed. But an infinite loop is detected and the heap memory exhausts

The file is

 

<!DOCTYPE doc [

<!ENTITY e1 "&e2;">

<!ENTITY e2 "&e3;">

<!ENTITY e3 "&e1;">

]>

<doc a="&e1 ;"></doc>

Though during parsing SAX raises the fatal error for the entity reference loop , as it’s in recovery mode parsing continues.

It calls the xmlStartElementNS and infinite loop occurs inside xmlStringLenGetNodeList () due to the recursive entity reference.

I want to know whether this API is designed to handle any type of invalid xml document or its usage limited to only some

Well formedness constraints.

 

Thanks and Regards

       Rabi

 

 

 



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