Skip to content

Validate size parameters in weight Read methods. - #268

Merged
copybara-service[bot] merged 1 commit into
mainfrom
copybara/954563883
Jul 27, 2026
Merged

Validate size parameters in weight Read methods.#268
copybara-service[bot] merged 1 commit into
mainfrom
copybara/954563883

Conversation

@copybara-service

Copy link
Copy Markdown

Validate size parameters in weight Read methods.

In SetWeight, StringWeight, and UnionWeight, reading deserialized weight sizes from input streams previously lacked bounds validation and stream failure checking. Large or negative size inputs could lead to integer overflows during buffer calculation or undefined behavior on read failure.

@copybara-service
copybara-service Bot force-pushed the copybara/954563883 branch 2 times, most recently from e30c8b2 to 3ff4bee Compare July 27, 2026 14:09
In `SetWeight`, `StringWeight`, and `UnionWeight`, reading deserialized weight sizes from input streams previously lacked bounds validation and stream failure checking. Large or negative size inputs could lead to integer overflows during buffer calculation or undefined behavior on read failure.

PiperOrigin-RevId: 954617954
@copybara-service
copybara-service Bot force-pushed the copybara/954563883 branch from 3ff4bee to cb1b8ca Compare July 27, 2026 14:30
@copybara-service
copybara-service Bot merged commit cb1b8ca into main Jul 27, 2026
@copybara-service
copybara-service Bot deleted the copybara/954563883 branch July 27, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant