commit | f65136ddaf3c78132e055fae9af28dbcd18f7574 | [log] [tgz] |
---|---|---|
author | Rhodri James <rhodri@kynesim.co.uk> | Tue Apr 25 16:26:20 2017 +0100 |
committer | Sebastian Pipping <sebastian@pipping.org> | Wed May 24 20:49:38 2017 +0200 |
tree | 06857d5b51ac118d9faaf2affe0e317f12019d80 | |
parent | 768613f801020dee30a0583ec6cd77ec401d747f [diff] |
Validate parser parameter to XML_SetReturnNSTriplet
diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c index e0e39de..84f18ae 100644 --- a/expat/lib/xmlparse.c +++ b/expat/lib/xmlparse.c
@@ -1308,6 +1308,8 @@ void XMLCALL XML_SetReturnNSTriplet(XML_Parser parser, int do_nst) { + if (parser == NULL) + return; /* block after XML_Parse()/XML_ParseBuffer() has been called */ if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED) return;