Re: [xml] libxml2 issue with corrupted data



On Thu, Aug 02, 2012 at 02:43:16PM +0000, Gidon Sidis wrote:
[...]
when the parser reaches to the <Tag> section than there is a call to startElement however there is no call 
for the endElement for at least 200 ms. What happens after this 200ms is that a new XML message arrives and 
our application calls xmlFreeParserCtxt for the ctxt member and call xmlParseChunk again thus losing the 
info the previous XML (not a good behavior on our side).

However if there is 1000ms delay between the messages than the parser succeeds to parse the XML and there 
is call to endElement.

Also if the string value in <Tag> is not messed up than the parse calls startElement & endElement within 
the same millisecond.

Can you please tell me why it takes so long for the parser to handle corrupted data? The parser doesn't 
fail to parse but rather takes his time... Is that an expected behavior?


  I have no idea, and can't tell without the actual input.
Provide data which reproduce the problem with xmllint --push or
xmllint --stream and then I will look at what is going on and try to
fix it. But without a way to reproduce the problem, sorry I can't
give an answer !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



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