Re: [libxml++] Unknown encoding crashes DOM Parser
- From: Christophe de VIENNE <cdevienne alphacent com>
- To: libxmlplusplus-general lists sourceforge net
- Subject: Re: [libxml++] Unknown encoding crashes DOM Parser
- Date: Wed, 11 Jun 2003 11:23:00 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Le Mardi 10 Juin 2003 13:07, p klotz icoserve com a écrit :
> The following encoding
> <?xml version="1.0" encoding="ISO-8859-15"?>
> leads to a crash under Windows and Linux.
>
> In domparser.cc / DomParser::parse_context() one finds:
>
> xmlParseDocument(_context);
> _doc = new Document(_context->myDoc); // context->myDoc is 0 if encoding is
> illegal, therefore the constructor segfaults
>
> It should be checked if _context->myDoc is a valid pointer.
>
Thanks for pointing this problem.
I wonder if it would be enough to move the _doc initialisation lower, after
_context->wellFormed and _context->valid are checked ?
In other terms, does _context->wellFormed and _context->valid implies
_context->myDoc ?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+5vT0B+sU3TyOQjARAmktAJ4skoiSOiVChiw331oTWe+KsYc+iwCgtxmj
aEaOjyi9PFyk7jkp6JnXN84=
=2Imr
-----END PGP SIGNATURE-----
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]