# HG changeset patch
# User Nick Wellnhofer <wellnhofer@aevum.de>
# Date 1661007722 -7200
#      Sat Aug 20 17:02:02 2022 +0200
# Node ID ff771a2f4c9788fd43cf9ccec179d78df6149523
# Parent  f7a865e72c1c843b238eda89af337d0efd970f4c
Use xmlStrlen in xmlNewStringInputStream

xmlStrlen handles buffers larger than INT_MAX more gracefully.

diff --git a/parserInternals.c b/parserInternals.c
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -1356,7 +1356,7 @@
 	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);