From f41ff4a32af0fd0a23fa1b6c7e5b693820cf53ea Mon Sep 17 00:00:00 2001 From: Rhodri James Date: Tue, 25 Apr 2017 17:40:49 +0100 Subject: [PATCH] Validate parser parameter to XML_SetNotStandaloneHandler --- expat/lib/xmlparse.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index c45afaa2..9cd124ba 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c @@ -1541,7 +1541,8 @@ void XMLCALL XML_SetNotStandaloneHandler(XML_Parser parser, XML_NotStandaloneHandler handler) { - notStandaloneHandler = handler; + if (parser != NULL) + notStandaloneHandler = handler; } void XMLCALL -- 2.40.0