XML_Parse(): If XML_GetBuffer() returns NULL, do not attempt to move
data aronud, just propogate the error. This closes SF bug #434665.
This commit is contained in:
parent
34966ccef9
commit
57a3480f95
@ -1134,8 +1134,13 @@ int XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
|
|||||||
}
|
}
|
||||||
#endif /* not defined XML_CONTEXT_BYTES */
|
#endif /* not defined XML_CONTEXT_BYTES */
|
||||||
else {
|
else {
|
||||||
memcpy(XML_GetBuffer(parser, len), s, len);
|
void *buff = XML_GetBuffer(parser, len);
|
||||||
return XML_ParseBuffer(parser, len, isFinal);
|
if (buff == NULL)
|
||||||
|
return 0;
|
||||||
|
else {
|
||||||
|
memcpy(buff, s, len);
|
||||||
|
return XML_ParseBuffer(parser, len, isFinal);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user