diff --git a/docs/changes.txt b/docs/changes.txt index 58510b7635..a83e0f9b14 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -125,6 +125,7 @@ All (GUI): - Fixed problem with Floatable(false) not working in wxAuiFrameManager. - Fixed maximize bug in wxAUI. - Allow period in link anchors in wxHTML. +- Fixed memory corruption in wxHTML when parsing "&;" in the markup. All (Unix): diff --git a/src/html/htmlpars.cpp b/src/html/htmlpars.cpp index 354f2b2466..c2028aa595 100644 --- a/src/html/htmlpars.cpp +++ b/src/html/htmlpars.cpp @@ -572,6 +572,9 @@ wxChar wxHtmlEntitiesParser::GetEntityChar(const wxString& entity) { unsigned code = 0; + if (entity.empty()) + return 0; // invalid entity reference + if (entity[0] == wxT('#')) { const wxChar *ent_s = entity.c_str();