Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential buffer vs. IO size mismatch in StorageBlock.
I don't think this happens in practice, or we would likely have seen crashes or corruption. When calling CopyFrom(), the other storage block must have the same num_buffers() value, otherwise we will allocate buffers when calling the Data() method based on the old num_buffers() value, and then update it to the other's num_buffer() value. Later on, Store() may calculate a size based upon the new value, but the buffer is still sized according to the old value. -- Add test to show this situation. Change-Id: Ib72215dd6c51d90be0483158543daf6a1d814b69 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5039450 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/main@{#1226956}
- Loading branch information