Page MenuHomePhabricator

[avalanche] Early bail when no matchign slot exists
ClosedPublic

Authored by deadalnix on Jun 30 2020, 14:26.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCc87ff257e439: [avalanche] Early bail when no matchign slot exists
Summary

In cases where the end is at the end of the array, this ensure we don't access out of bounds. In practice, this isn't a huge deal because the value read is not used and, unless it happens to precisely match a page boundary, it can't fail. Still worth fixing.

Test Plan
Repeatedly ran `ninja check-avalanche` under asan.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

deadalnix created this revision.Jun 30 2020, 14:26
Herald added a reviewer: Restricted Project. · View Herald TranscriptJun 30 2020, 14:26
deadalnix requested review of this revision.Jun 30 2020, 14:26
Fabien accepted this revision.Jun 30 2020, 14:30
This revision is now accepted and ready to land.Jun 30 2020, 14:30
This revision was landed with ongoing or failed builds.Jun 30 2020, 14:30
This revision was automatically updated to reflect the committed changes.