angler-fishThe Vulnerability History Project

SVGElement destructor may use invalid iterator

      When an SVGElement object has rare data, its destructor gets a
hash map iterator for the rare data, uses it to clear resources,
then uses the iterator to delete the rare data. However, the resource
cleanup can delete other SVG elements, thus modifying the hash map
from which the iterator came and hence invalidating the iterator
itself.

The fix is to re-get the iterator before deleting the rare data.

BUG=235638
R=inferno@chromium.org, pdr@chromium.org

Review URL: https://codereview.chromium.org/14533008

git-svn-id: svn://svn.chromium.org/blink/trunk@149347 bbb929c8-8fbe-4397-9dbb-9b2b20218538
    
commit 6b2c2ab094982add82789bb6587227981f08e6a6
-1
-30
-5
expand_less