jkesselm opened a new pull request, #184: URL: https://github.com/apache/xalan-java/pull/184
Fixes the specific buffer-crossing issue tested in the associated xalan-test branch. As discussed in XALANJ-2725, there are still some edge conditions possible here. But it fixes one known bad case, and at least partially guards against another. My *preferred* fix would be to have malformed UTF16 input throw exceptions rather than trying to dance around this to output (unusable) Numeric Character References for isolated surrogates, but the code is currently inconsistent about that and seems to suggest that we moved away from that for some reason... and I don't recall why we thought the fake-NCRs were a good idea. If we stay with fake-NCRs for isolated surrogates, I'm seriously considering changing them to be fake-entity-references, which will at least not be syntactically incorrect; this could be done by replacing the current output, eg `�`, with something more like `&ERR_INVALID_UTF16_SURROGATE_55308;` , using the MsgKey string so we at least are in synch with the internationalization layer for clarity. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
