Validate parser parameter to XML_GetCurrentColumnNumber
This commit is contained in:
parent
1bf78fe1fb
commit
11ec6aefd1
@ -943,7 +943,8 @@ XML_GetErrorCode(XML_Parser parser);
|
||||
was detected; otherwise the location is the location of the last
|
||||
parse event, as described above.
|
||||
|
||||
Note: XML_GetCurrentLineNumber returns 0 to indicate an error
|
||||
Note: XML_GetCurrentLineNumber and XML_GetCurrentColumnNumber
|
||||
return 0 to indicate an error.
|
||||
Note: XML_GetCurrentByteIndex returns -1 to indicate an error.
|
||||
*/
|
||||
XMLPARSEAPI(XML_Size) XML_GetCurrentLineNumber(XML_Parser parser);
|
||||
|
@ -2071,6 +2071,8 @@ XML_GetCurrentLineNumber(XML_Parser parser)
|
||||
XML_Size XMLCALL
|
||||
XML_GetCurrentColumnNumber(XML_Parser parser)
|
||||
{
|
||||
if (parser == NULL)
|
||||
return 0;
|
||||
if (eventPtr && eventPtr >= positionPtr) {
|
||||
XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
|
||||
positionPtr = eventPtr;
|
||||
|
Loading…
Reference in New Issue
Block a user