GNOME Bugzilla – Bug 780077
Revert unneeded change to htmlParseNameComplex() from Bug 758605
Last modified: 2017-06-19 16:32:04 UTC
Per Bug 766956 Comment #11 from Nick Wellnhofer, the change to htmlParseNameComplex() for Bug 758605 is redundant and can be removed: <https://git.gnome.org/browse/libxml2/commit/?id=a820dbeac29d330bae4be05d9ecd939ad6b4aa33> The proper fix was the change landed for Bug 758518: <https://git.gnome.org/browse/libxml2/commit/?id=beca86e8c86984b967a6efa05a9653470253edda>
Created attachment 347981 [details] [review] Patch v1
So Nick's fix that he committed for Bug 766956 kept the equivalent of this change in the XML parser as a hardening measure: - if (ctxt->input->base > ctxt->input->cur - len) - return(NULL); Perhaps this should be kept in the HTML parser as a hardening measure, too?
Yes, keeping the check is a good idea. I only made some minor adjustments: https://git.gnome.org/browse/libxml2/commit/?id=f39e3be0dd9b3aa3ec47ff339b4934c16f6e5156
Can we add the new test cases as well? That was the bulk of the attached patch.
Applied here: https://git.gnome.org/browse/libxml2/commit/?id=85c112a0828a13aadf9fa806a38dfb185e1ddd4c
(In reply to Nick Wellnhofer from comment #5) > Applied here: > https://git.gnome.org/browse/libxml2/commit/?id=85c112a0828a13aadf9fa806a38dfb185e1ddd4c Thanks Nick!