mirror of
https://github.com/libexpat/libexpat.git
synced 2025-04-15 00:38:15 +00:00
Validate parameters to XML_GetInputContext
This commit is contained in:
parent
fd2571b27a
commit
88731abd62
1 changed files with 2 additions and 0 deletions
|
@ -2045,6 +2045,8 @@ const char * XMLCALL
|
|||
XML_GetInputContext(XML_Parser parser, int *offset, int *size)
|
||||
{
|
||||
#ifdef XML_CONTEXT_BYTES
|
||||
if (parser == NULL || offset == NULL || size == NULL)
|
||||
return NULL;
|
||||
if (eventPtr && buffer) {
|
||||
*offset = (int)(eventPtr - buffer);
|
||||
*size = (int)(bufferEnd - buffer);
|
||||
|
|
Loading…
Add table
Reference in a new issue