]> git.saurik.com Git - wxWidgets.git/commit
Fixes for parsing invalid HTML without tag ends.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 13 Jan 2011 14:49:55 +0000 (14:49 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 13 Jan 2011 14:49:55 +0000 (14:49 +0000)
commit3625820490496633a180ee57035f11b86c181798
tree8d0584b36bbe69b79e43ba3c6701252a0f0331c6
parent48d8ea6d933701be6825f86ae2e3745776d9349f
Fixes for parsing invalid HTML without tag ends.

The code in wxHtmlParser supposed in many places that a '<' character must be
always followed by a '>' one and could create (and sometimes dereference)
invalid iterators if this wasn't the case resulting in asserts from MSVC debug
CRT and possibly crashes.

Fix this by ensuring that only valid iterators are used and add a trivial unit
test for wxHtmlParser which checks that it can parse invalid HTML without
crashing.

Closes #12869.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
13 files changed:
src/html/htmlpars.cpp
src/html/htmltag.cpp
tests/Makefile.in
tests/html/htmlparser.cpp [new file with mode: 0644]
tests/makefile.bcc
tests/makefile.gcc
tests/makefile.vc
tests/makefile.wat
tests/test.bkl
tests/test_test_gui.dsp
tests/test_vc7_test_gui.vcproj
tests/test_vc8_test_gui.vcproj
tests/test_vc9_test_gui.vcproj