#15348 closed defect (fixed)

HTML image map, area without coords attribute causes crash on hovered image

Reported by: LukasK Owned by:
Priority: normal Milestone:
Component: wxHtml Version:
Keywords: Cc:
Blocked By: Blocking:
Patch: yes

Description

Showing a web page with an image map where a rect or circle <area>-item lacks the coords-attribute causes an assertion (or crash on invalid array access).

wx/dynarray.h(839): assert "uiIndex < m_nCount" failed in wxBaseArrayPtrVoid::Item().

Attachments (2)

image_map_crash_repro.zip download (15.9 KB) - added by LukasK 17 months ago.
C++ and wxPython applications for reproducing.
m_image.cpp.patch download (7.7 KB) - added by LukasK 17 months ago.
Patch which adds array length checks, preventing the crash.

Download all attachments as: .zip

Change History (5)

Changed 17 months ago by LukasK

C++ and wxPython applications for reproducing.

Changed 17 months ago by LukasK

Patch which adds array length checks, preventing the crash.

comment:1 Changed 17 months ago by LukasK

...that is, hovering such an image with the mouse pointer in a wxHtmlWindow causes the crash.

comment:2 Changed 17 months ago by VZ

(In [74568]) No changes, just remove an extra pair of braces in wxHTML code.

See #15348.

comment:3 Changed 17 months ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [74569]) 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.

Note: See TracTickets for help on using tickets.