mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-09 22:47:48 +00:00
Validate parser parameter to XML_GetSpecifiedAttributeCount
This commit is contained in:
parent
4c639fc7c0
commit
c5baf7e3e4
2 changed files with 3 additions and 1 deletions
|
@ -732,7 +732,7 @@ XML_GetBase(XML_Parser parser);
|
|||
to the XML_StartElementHandler that were specified in the start-tag
|
||||
rather than defaulted. Each attribute/value pair counts as 2; thus
|
||||
this correspondds to an index into the atts array passed to the
|
||||
XML_StartElementHandler.
|
||||
XML_StartElementHandler. Returns -1 if parser == NULL.
|
||||
*/
|
||||
XMLPARSEAPI(int)
|
||||
XML_GetSpecifiedAttributeCount(XML_Parser parser);
|
||||
|
|
|
@ -1354,6 +1354,8 @@ XML_GetBase(XML_Parser parser)
|
|||
int XMLCALL
|
||||
XML_GetSpecifiedAttributeCount(XML_Parser parser)
|
||||
{
|
||||
if (parser == NULL)
|
||||
return -1;
|
||||
return nSpecifiedAtts;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue