Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7e251273 authored by Jason Simmons's avatar Jason Simmons Committed by Android (Google) Code Review
Browse files

Ensure that Vector::erase() returns a valid iterator

Vector::erase may reallocate the Vector's storage while removing an element.
However, erase() calls begin() before calling removeItemsAt(), thus caching
a pointer the the Vector's old storage.  If the storage is reallocated,
the iterator returned by erase() will be based on the old storage pointer
and will thus be invalid.

Bug: 7433283

Change-Id: I91980e0fcb5a2e0a55f1a78444a5958037afdbed
parent 446ba537
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment