mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
Use xmlStrlen in xmlNewStringInputStream
xmlStrlen handles buffers larger than INT_MAX more gracefully.
This commit is contained in:
parent
5b2d07a726
commit
c21e9cd5d9
@ -1356,7 +1356,7 @@ xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) {
|
||||
xmlGenericError(xmlGenericErrorContext,
|
||||
"new fixed input: %.30s\n", buffer);
|
||||
buf = xmlParserInputBufferCreateMem((const char *) buffer,
|
||||
strlen((const char *) buffer),
|
||||
xmlStrlen(buffer),
|
||||
XML_CHAR_ENCODING_NONE);
|
||||
if (buf == NULL) {
|
||||
xmlErrMemory(ctxt, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user