• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1From c21e9cd5d955e4d8afa514e1f7736ce6a9bb8f2e Mon Sep 17 00:00:00 2001
2From: Nick Wellnhofer <wellnhofer@aevum.de>
3Date: Sat, 20 Aug 2022 17:02:02 +0200
4Subject: [PATCH] Use xmlStrlen in xmlNewStringInputStream
5
6xmlStrlen handles buffers larger than INT_MAX more gracefully.
7
8Reference:https://github.com/GNOME/libxml2/commit/c21e9cd5d955e4d8afa514e1f7736ce6a9bb8f2e
9Conflict:NA
10---
11 parserInternals.c | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/parserInternals.c b/parserInternals.c
15index 6ef7671..2b05dac 100644
16--- a/parserInternals.c
17+++ b/parserInternals.c
18@@ -1476,7 +1476,7 @@ xmlNewStringInputStream(xmlParserCtxtPtr ctxt, const xmlChar *buffer) {
19 	xmlGenericError(xmlGenericErrorContext,
20 		"new fixed input: %.30s\n", buffer);
21     buf = xmlParserInputBufferCreateMem((const char *) buffer,
22-                                        strlen((const char *) buffer),
23+                                        xmlStrlen(buffer),
24                                         XML_CHAR_ENCODING_NONE);
25     if (buf == NULL) {
26 	xmlErrMemory(ctxt, NULL);
27--
282.27.0
29
30