A UTF-8 document that has the encoding declaration set to utf-16 can crash
the sax parser.  The autosense code works correctly but there is a bug in
XMLReader::setEncoding.  fEncodingStr is prematurely deleted and nulled out
before the code realizes that it contains the correct value.  Later in
XMLTransService::makeNewTranscoderFor, the zeroed fEncodingStr is
dereferenced causing an access violation.

The following document demonstrates the problem:

<?xml version="1.0" encoding="utf-16"?>
<document/>



I believe the fix is to wait until after we pass the "return false" cases in
XMLReader::setEncoding to delete fEncodingStr.  I am testing it now.


Peter Fein
[EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to