1From 0ab4b951f6906b341201dba46d4ebec05156cbe6 Mon Sep 17 00:00:00 2001 2From: Nick Wellnhofer <wellnhofer@aevum.de> 3Date: Sun, 20 Nov 2022 19:55:12 +0100 4Subject: [PATCH 19/28] parser: Fix 'consumed' accounting when switching 5 encodings 6 7Reference: https://github.com/GNOME/libxml2/commit/691a7719566141bb5fbe6212498d1f0568c2610f 8Conflict: parserInternals.c:<xmlSwitchInputEncodingInt> 9--- 10 parserInternals.c | 1 + 11 1 file changed, 1 insertion(+) 12 13diff --git a/parserInternals.c b/parserInternals.c 14index 2b05dac..422dfc0 100644 15--- a/parserInternals.c 16+++ b/parserInternals.c 17@@ -1178,6 +1178,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input, 18 */ 19 processed = input->cur - input->base; 20 xmlBufShrink(input->buf->buffer, processed); 21+ input->consumed += processed; 22 input->buf->raw = input->buf->buffer; 23 input->buf->buffer = xmlBufCreate(); 24 input->buf->rawconsumed = processed; 25-- 262.27.0 27 28