Skip to content

Auto-port 5.0: Reject negative maxOrder in PooledByteBufAllocator - #17094

Merged
normanmaurer merged 1 commit into
5.0from
auto-port-pr-17093-to-5.0
Jul 18, 2026
Merged

normanmaurer merged 1 commit into
5.0from
auto-port-pr-17093-to-5.0

Conversation

@netty-project-bot

Copy link
Copy Markdown
Contributor

Auto-port of #17093 to 5.0
Cherry-picked commit: 010b6e8


Motivation:

The valid range of maxOrder is 0 to 14, but negative values were accepted because only the upper bound was validated. When configured through io.netty.allocator.maxOrder, a negative value may result in an invalid chunk size during static initialization.

Modification:

Validate the lower bound of maxOrder and add a regression test.

Result:

Negative maxOrder values are rejected with an IllegalArgumentException.

Motivation:

The valid range of `maxOrder` is 0 to 14, but negative values were
accepted because only the upper bound was validated. When configured
through `io.netty.allocator.maxOrder`, a negative value may result in an
invalid chunk size during static initialization.

Modification:

Validate the lower bound of `maxOrder` and add a regression test.

Result:

Negative `maxOrder` values are rejected with an
`IllegalArgumentException`.

(cherry picked from commit 010b6e8)
@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Jul 18, 2026
@normanmaurer
normanmaurer merged commit 2768b53 into 5.0 Jul 18, 2026
13 checks passed
@normanmaurer
normanmaurer deleted the auto-port-pr-17093-to-5.0 branch July 18, 2026 06:08
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.

3 participants