diff options
author | Yuri Lin <yurilin@google.com> | 2021-04-27 11:13:49 -0400 |
---|---|---|
committer | Yuri Lin <yurilin@google.com> | 2021-04-27 18:16:51 +0000 |
commit | acbca16cfaf4248320ab8c5e1e7189bf314eaa29 (patch) | |
tree | fbe7d7d4cba2ab3471071526e93936e7045a8864 /native/android/surface_control.cpp | |
parent | f10473c64ccafb9a1a2d20432d228c01c118159d (diff) |
Use an iterator in removeChannelNotifications rather than index.
The index-based implementation is buggy because if an element is removed from the list, the current index will be incorrect, thus both skipping over an element and potentially running off the end of the list.
This change also modifies ArchiveTest to test these edge cases.
Test: atest ArchiveTest (before & after change)
Bug: 186473453
Change-Id: I1611aa6d3630beef60f916d59a76c7976f1648d2
Diffstat (limited to 'native/android/surface_control.cpp')
0 files changed, 0 insertions, 0 deletions