Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error passing oversized array to PrimitiveImmutableList #325

Merged
merged 1 commit into from
Jul 21, 2024

Conversation

Ampflower
Copy link
Contributor

*ImmutableList for primitives can produce an ArrayIndexOutOfBoundsException via System.arraycopy due to using a.length rather than this.a.length or size() within context of the parameter being named a as well.

This also introduces testcases in IntImmutableListTest and IntArrayListTest to ensure that the check does not regress.

@vigna vigna merged commit a1840bc into vigna:master Jul 21, 2024
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.

2 participants