Skip to content

In TransposeDecoder, do not reserve a large untrusted size before reading the corresponding data. - #65

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_1019357874
Nov 17, 2026
Merged

copybara-service[bot] merged 1 commit into
masterfrom
test_1019357874

Conversation

@copybara-service

Copy link
Copy Markdown

In TransposeDecoder, do not reserve a large untrusted size before reading the corresponding data.

Replace eagerly sized absl::FixedArray allocations (tags,
first_buffer_indices, bucket_indices) with std::vector, reserve(), and
push_back().

Limit reserve() capacities to 64K for schema-sized vectors
(state_machine_size, num_buckets, num_buffers) and 1M for record-sized
vectors (num_records).

Defer sizing dependent arrays until the corresponding reading loops complete.

Remove redundant max_size() checks which were needed only to avoid arithmetic
overflow in the argument of reserve() or absl::FixedArray.

@copybara-service
copybara-service Bot force-pushed the test_1019357874 branch 3 times, most recently from a3eb134 to 328cbeb Compare November 17, 2026 14:26
…eading the corresponding data.

Replace eagerly sized `absl::FixedArray` allocations (`tags`,
`first_buffer_indices`, `bucket_indices`) with `std::vector`, `reserve()`, and
`push_back()`.

Limit `reserve()` capacities to 64K for schema-sized vectors
(`state_machine_size`, `num_buckets`, `num_buffers`) and 1M for record-sized
vectors (`num_records`).

Defer sizing dependent arrays until the corresponding reading loops complete.

Remove redundant `max_size()` checks which were needed only to avoid arithmetic
overflow in the argument of `reserve()` or `absl::FixedArray`.

PiperOrigin-RevId: 1023692148
@copybara-service
copybara-service Bot merged commit 55c1189 into master Nov 17, 2026
3 checks passed
@copybara-service
copybara-service Bot deleted the test_1019357874 branch November 17, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant