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
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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.