Re: [xml] htmlCheckEncoding doesn't update input-end after shrink



On Wed, Mar 10, 2010 at 01:27:47PM +0300, Eugene Pimenov wrote:
Hello!

htmlCheckEncoding has missing input->end update, so when buffer is relocated it could parse html data 
twice. A program that reproduces that case is attached.

  Ah right, good catch, patch is right !
Patch applied thanks !

It's weird it copies memory buffer though. Maybe we should mark buffer that are not supposed to shrink/grow 
with a flag?

  It's a bit complex, there are immutable buffers, but then they have to
expect some kind of 0 termination, plus there is the problem of
encoding conversions.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]