Re: [xml] null pointer access in htmlCreateDocParserCtxt()



On Fri, Apr 27, 2007 at 08:53:13AM +0200, Jean-Daniel Dupas wrote:

Le 26 avr. 07 à 11:00, Daniel Veillard a écrit :

On Thu, Apr 26, 2007 at 10:29:16AM +0200, Jean-Daniel Dupas wrote:
Hello,

I just want to signal a problem in htmlCreateDocParserCtxt.

If "htmlCreateMemoryParserCtxt" returns a NULL context and the
encoding parameter is not null, htmlCreateDocParserCtxt wil crash
when it try to read "ctxt->input->encoding".

 error, it should return NULL immediately


len = xmlStrlen(cur);
ctxt = htmlCreateMemoryParserCtxt((char *)cur, len);
return(NULL);

Just about the patch you commit, maybe the return NULL should be  
conditional?

  Dohhh ... unbelievable ... Well you can tell I was way too busy yesterday,
fixed in revision 3610,

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/



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