Validate parser parameter to XML_SetUnknownEncodingHandler
@@ -1577,6 +1577,8 @@ XML_SetUnknownEncodingHandler(XML_Parser parser,
XML_UnknownEncodingHandler handler,
void *data)
{
+ if (parser == NULL)
+ return;
unknownEncodingHandler = handler;
unknownEncodingHandlerData = data;
}
