153aa9179Sopenharmony_ciFrom 0ab4b951f6906b341201dba46d4ebec05156cbe6 Mon Sep 17 00:00:00 2001
253aa9179Sopenharmony_ciFrom: Nick Wellnhofer <wellnhofer@aevum.de>
353aa9179Sopenharmony_ciDate: Sun, 20 Nov 2022 19:55:12 +0100
453aa9179Sopenharmony_ciSubject: [PATCH 19/28] parser: Fix 'consumed' accounting when switching
553aa9179Sopenharmony_ci encodings
653aa9179Sopenharmony_ci
753aa9179Sopenharmony_ciReference: https://github.com/GNOME/libxml2/commit/691a7719566141bb5fbe6212498d1f0568c2610f
853aa9179Sopenharmony_ciConflict: parserInternals.c:<xmlSwitchInputEncodingInt>
953aa9179Sopenharmony_ci---
1053aa9179Sopenharmony_ci parserInternals.c | 1 +
1153aa9179Sopenharmony_ci 1 file changed, 1 insertion(+)
1253aa9179Sopenharmony_ci
1353aa9179Sopenharmony_cidiff --git a/parserInternals.c b/parserInternals.c
1453aa9179Sopenharmony_ciindex 2b05dac..422dfc0 100644
1553aa9179Sopenharmony_ci--- a/parserInternals.c
1653aa9179Sopenharmony_ci+++ b/parserInternals.c
1753aa9179Sopenharmony_ci@@ -1178,6 +1178,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
1853aa9179Sopenharmony_ci              */
1953aa9179Sopenharmony_ci             processed = input->cur - input->base;
2053aa9179Sopenharmony_ci             xmlBufShrink(input->buf->buffer, processed);
2153aa9179Sopenharmony_ci+	    input->consumed += processed;
2253aa9179Sopenharmony_ci             input->buf->raw = input->buf->buffer;
2353aa9179Sopenharmony_ci             input->buf->buffer = xmlBufCreate();
2453aa9179Sopenharmony_ci 	    input->buf->rawconsumed = processed;
2553aa9179Sopenharmony_ci-- 
2653aa9179Sopenharmony_ci2.27.0
2753aa9179Sopenharmony_ci
28