From c0213e2ace2a4d1b08f3cc58e169e8d13a9865b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 31 Aug 2008 14:00:07 +0000 Subject: [PATCH] fixed memory corruption in wxHTML when parsing '&;' in the markup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/html/htmlpars.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index a41e5358d4..1274b14f6b 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -557,6 +557,9 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity) const { unsigned code = 0; + if (entity.empty()) + return 0; // invalid entity reference + if (entity[0] == wxT('#')) { // NB: parsed value is a number, so it's OK to use wx_str(), internal