diff options
author | Edwin Mons <edwin.mons@isode.com> | 2019-10-30 00:09:29 (GMT) |
---|---|---|
committer | Edwin Mons <edwin.mons@isode.com> | 2019-10-30 00:17:42 (GMT) |
commit | a616265f7a5a48c5769262027795f99df91a6ae8 (patch) | |
tree | ed7ebe35692083b599e58500a0067f7f14b6809e /Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h | |
parent | 943f4cd11f35573e1af91be578cd058fac34b670 (diff) | |
download | swift-a616265f7a5a48c5769262027795f99df91a6ae8.zip swift-a616265f7a5a48c5769262027795f99df91a6ae8.tar.bz2 |
Fix libxml2 crash on certain invalid input
When the libxml2 parser is fed data with an odd combination of invalid
input (triggering the parser to assume 2 or 4 byte encodings were in
play), I/O errors might occur. In that case, the parser context will
not have its internal error set, but the call to xmlParseChunk will
return the right error. The parse() method now uses the output of
xmlParseChunk directly instead of trying to obtain the error from the
parser context afterwards.
Encoding errors during parsing were emitted to stderr because the
default error handlers were still in place. These have been replaced
with custom handlers that suppress the output.
Test-Information:
Unit tests pass on Debian 9
Change-Id: Ie01db4be467e5197203c9d07d3356f5d44d8b9b4
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers/MIXRegisterNickSerializer.h')
0 files changed, 0 insertions, 0 deletions