From 20d7945cdb72ee587d10fd84fdf0913a027a5253 Mon Sep 17 00:00:00 2001
From: Eugene Pimenov <libc@mac.com>
Date: Wed, 10 Mar 2010 11:58:02 +0300
Subject: [PATCH] Fix double parsing when buffer changes its base in htmlCheckEncoding

* parser.c: update ctxt->input->end after xmlBufferShrink in htmlCheckEncoding
---
 HTMLparser.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/HTMLparser.c b/HTMLparser.c
index 3d4831c..9306b61 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3478,6 +3478,7 @@ htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
 	    }
 	    ctxt->input->base =
 	    ctxt->input->cur = ctxt->input->buf->buffer->content;
+	    ctxt->input->end = &ctxt->input->base[ctxt->input->buf->buffer->use];
 	}
     }
 }
-- 
1.7.0.rc2.13.g8b233.dirty+GitX