Re: [xml] Crash when parsing bad HTML

I should have mentioned that is crashes when encountering "<?PRE>. (My example also meant to be </HTML> at the end but it never gets that far.


I'm using the HTML parser (htmlParseDocument) and my application segfaults when processing this document:

  Some text

The gdb traceback is:
#0  0x0000002a96e3a4e4 in xmlSAX2ProcessingInstruction () from /usr/lib64/
#1  0x0000002a96db9779 in htmlParseEntityRef () from /usr/lib64/
#2  0x0000002a96dbb69a in htmlParseElement () from /usr/lib64/
# ...

Of course, it's bad HTML but an exception would be more acceptable. I tried using the latest official version (2.6.29) and the problem occurs there too. Is there a patch somewhere? If not, a hint would be appreciated because I'm going to have to fix it.

Cheers, Pierre

_______________________________________________ xml mailing list, project page xml gnome org

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