[libxml-devel] Guaranteed non-crashing way to load an XML document?
Keith Fahlgren
keith at oreilly.com
Tue Feb 5 11:26:42 EST 2008
On 2/5/08 8:24 AM, Saurabh Nanda wrote:
>> Do you have crashes that can break out of a begin block? What does that content
>> look like?
>
> I didn't quite understand your question. The code snippet in the
> original posting is not placed inside a begin-rescue block. The
> incoming XML can also be an illegal XML (something which doesn't
> parse), but that shouldn't cause libxml to segfault.
Well, we might have different opinions on what libxml should do with bad input
(I agree that segfaulting isn't very nice). That said, I can't imagine parsing
bytes in the wild as "xml" and not doing a lot of error handling.
Keith
More information about the libxml-devel
mailing list