Check the number of points in the image map in wxHTML.

Don't crash if an <area> element is incorrect and doesn't have the required
number of coords attributes.

Closes #15348.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2013-07-17 17:27:09 +00:00
parent 4cdb8e430c
commit 2767360fa8
2 changed files with 11 additions and 1 deletions

View File

@ -557,6 +557,14 @@ Major new features in this release
was added.
3.0: (released 2013-09-??)
--------------------------
All (GUI):
- Fix crash in wxHTML on mal-formed <area> elements (LukasK).
2.9.5: (released 2013-07-15)
----------------------------

View File

@ -95,6 +95,7 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
switch (type)
{
case RECT:
if ( coords.GetCount() == 4 )
{
int l, t, r, b;
@ -106,9 +107,10 @@ wxHtmlLinkInfo *wxHtmlImageMapAreaCell::GetLink( int x, int y ) const
{
return m_Link;
}
break;
}
break;
case CIRCLE:
if ( coords.GetCount() == 3 )
{
int l, t, r;
double d;