Skip to content

[6.40] [tree] In TBasket/TBranch, error out if reading oob in the streamer#22815

Open
silverweed wants to merge 4 commits into
root-project:v6-40-00-patchesfrom
silverweed:BP_6.40_pull_22165
Open

[6.40] [tree] In TBasket/TBranch, error out if reading oob in the streamer#22815
silverweed wants to merge 4 commits into
root-project:v6-40-00-patchesfrom
silverweed:BP_6.40_pull_22165

Conversation

@silverweed

Copy link
Copy Markdown
Contributor

Backport of #22165

(cherry picked from commit aa344c0)
Following 15d2d71, fEntryOffset is
(conditionally) allocated with a capacity of fNevBuf, i.e. the number of
elements that are read into it.
However, one code path in WriteBuffer() writes fEntryOffset up to one
past the fNevBuf-th element, causing an OOB write.

This was (usually) not happening prior to the aforementioned commit
because fEntryOffset was allocated with a default capacity of 1000
(even though all elements past the fNevBuf-th were never initialized).

To fix the OOB write, we now allocate one extra element when reading
fEntryOffset from disk so that the WriteBuffer write is not OOB anymore.

(cherry picked from commit 45efd3c)
@github-actions

Copy link
Copy Markdown

Test Results

    22 files      22 suites   3d 10h 5m 25s ⏱️
 3 861 tests  3 861 ✅ 0 💤 0 ❌
77 150 runs  77 150 ✅ 0 💤 0 ❌

Results for commit a1cda71.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant