From d90ac35610dea4aee779b43b393a6dbc03ab99ac Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 25 Apr 2017 16:29:27 +0100 Subject: [PATCH] Validate parser parameter to XML_SetUserData --- expat/lib/xmlparse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index 84f18ae3..26ed9773 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -1319,6 +1319,8 @@ XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) void XMLCALL XML_SetUserData(XML_Parser parser, void *p) { + if (parser == NULL) + return; if (handlerArg == userData) handlerArg = userData = p; else -- 2.40.0