From: Christophe de V. <cde...@al...> - 2003-06-11 09:22:52
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Le Mardi 10 Juin 2003 13:07, p....@ic... a =E9crit : > The following encoding > <?xml version=3D"1.0" encoding=3D"ISO-8859-15"?> > leads to a crash under Windows and Linux. > > In domparser.cc / DomParser::parse_context() one finds: > > xmlParseDocument(_context); > _doc =3D new Document(_context->myDoc); // context->myDoc is 0 if encodin= g 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= =20 _context->wellFormed and _context->valid are checked ? In other terms, does _context->wellFormed and _context->valid implies=20 _context->myDoc ? =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+5vT0B+sU3TyOQjARAmktAJ4skoiSOiVChiw331oTWe+KsYc+iwCgtxmj aEaOjyi9PFyk7jkp6JnXN84=3D =3D2Imr =2D----END PGP SIGNATURE----- |