Introduced by me in D2348. Thanks to Jason for catching this with ASan.
Details
Details
- Reviewers
deadalnix - Group Reviewers
Restricted Project - Commits
- rSTAGING8836ff3e2d5f: fix out-of-bounds memory write in key_tests
rABC8836ff3e2d5f: fix out-of-bounds memory write in key_tests
make check
I ran ASan-compiled ./src/test/test_bitcoin --run_test=key_tests with and without this patch. Prior to patch it revealed memory error "WRITE of size 32"; afterwards it has no errors.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- fix_key_tests
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 5672 Build 9406: Bitcoin ABC Buildbot (legacy) Build 9405: arc lint + arc unit
Event Timeline
Comment Actions
Bug was that even when rlen < 32, it always tries to write 32 bytes into ret, but offset such that it would write past the end of ret.