mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
Use xmlStrlen in xmlNewStringInputStream
xmlStrlen handles buffers larger than INT_MAX more gracefully.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user