Commit 362b32293487ece0dc76b9df29c59e25c0712432

Nick Wellnhofer 2017-06-07T16:35:28

Fix memory leak in xmlBufAttrSerializeTxtContent The serializer sets doc->encoding to a temporary value and restores the original value when it's done. This overwrites the encoding value set in xmlBufAttrSerializeTxtContent, causing a memory leak. Don't mess with doc->encoding if invalid UTF-8 is encountered. Found with libFuzzer and ASan.