153aa9179Sopenharmony_ciFrom c21e9cd5d955e4d8afa514e1f7736ce6a9bb8f2e Mon Sep 17 00:00:00 2001
253aa9179Sopenharmony_ciFrom: Nick Wellnhofer <wellnhofer@aevum.de>
353aa9179Sopenharmony_ciDate: Sat, 20 Aug 2022 17:02:02 +0200
453aa9179Sopenharmony_ciSubject: [PATCH] Use xmlStrlen in xmlNewStringInputStream
553aa9179Sopenharmony_ci
653aa9179Sopenharmony_cixmlStrlen handles buffers larger than INT_MAX more gracefully.
753aa9179Sopenharmony_ci
853aa9179Sopenharmony_ciReference:https://github.com/GNOME/libxml2/commit/c21e9cd5d955e4d8afa514e1f7736ce6a9bb8f2e
953aa9179Sopenharmony_ciConflict:NA
1053aa9179Sopenharmony_ci---
1153aa9179Sopenharmony_ci parserInternals.c | 2 +-
1253aa9179Sopenharmony_ci 1 file changed, 1 insertion(+), 1 deletion(-)
1353aa9179Sopenharmony_ci
1453aa9179Sopenharmony_cidiff --git a/parserInternals.c b/parserInternals.c
1553aa9179Sopenharmony_ciindex 6ef7671..2b05dac 100644
1653aa9179Sopenharmony_ci--- a/parserInternals.c
1753aa9179Sopenharmony_ci+++ b/parserInternals.c
1853aa9179Sopenharmony_ci@@ -1476,7 +1476,7 @@ xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) {
1953aa9179Sopenharmony_ci 	xmlGenericError(xmlGenericErrorContext,
2053aa9179Sopenharmony_ci 		"new fixed input: %.30s\n", buffer);
2153aa9179Sopenharmony_ci     buf = xmlParserInputBufferCreateMem((const char *) buffer,
2253aa9179Sopenharmony_ci-                                        strlen((const char *) buffer),
2353aa9179Sopenharmony_ci+                                        xmlStrlen(buffer),
2453aa9179Sopenharmony_ci                                         XML_CHAR_ENCODING_NONE);
2553aa9179Sopenharmony_ci     if (buf == NULL) {
2653aa9179Sopenharmony_ci 	xmlErrMemory(ctxt, NULL);
2753aa9179Sopenharmony_ci-- 
2853aa9179Sopenharmony_ci2.27.0
2953aa9179Sopenharmony_ci
30