Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge bitcoin/bitcoin#29176: wallet: Fix use-after-free in WalletBatc…
…h::EraseRecords faebf1d wallet: Fix use-after-free in WalletBatch::EraseRecords (MarcoFalke) Pull request description: Creating a copy of the pointer to the underlying data of the stream is not enough to copy the data. Currently this happens to work sometimes, because the stream may not immediately free unused memory. However, there is no guarantee by the stream interface to always behave this way. Also, if `vector::clear` is called on the underlying memory, any pointers to it are invalid. Fix this, by creating a full copy of all bytes. ACKs for top commit: achow101: ACK faebf1d Tree-SHA512: 79ede9bc16cf257609545597bc6d9623ceead4531780ea6037cc5684aa3a7c7d80601354d315358defe47193f978a8ce40c5dc4637e32936c76157679b549ac5
- Loading branch information