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

[IO-825] Add byte array size validation for methods in EndianUtils #521

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

arthurscchan
Copy link
Contributor

@arthurscchan arthurscchan commented Dec 6, 2023

https://issues.apache.org/jira/browse/IO-825

This PR fixes the possible IndexOutOfBoundsException from methods in EndianUtils by adding a validation method to those methods. The validation method throws an IllegalArgumentException if the provided byte array does not have enough data for reading or does not have enough space for writing.

Signed-off-by: Arthur Chan <arthur.chan@adalogics.com>
@arthurscchan arthurscchan marked this pull request as ready for review December 6, 2023 21:07
@garydgregory garydgregory merged commit 50cfd14 into apache:master Dec 7, 2023
2 of 15 checks passed
dongjoon-hyun pushed a commit to apache/spark that referenced this pull request Mar 31, 2024
### What changes were proposed in this pull request?
The pr aims to upgrade `commons-io` from `2.15.1` to `2.16.0`.

### Why are the changes needed?
1.2.15.1 vs 2.16.0
apache/commons-io@rel/commons-io-2.15.1...rel/commons-io-2.16.0

2.The version fix some bugs:
apache/commons-io#525
apache/commons-io#521

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes #45781 from panbingkun/SPARK-47656.

Authored-by: panbingkun <panbingkun@baidu.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
sweisdb pushed a commit to sweisdb/spark that referenced this pull request Apr 1, 2024
### What changes were proposed in this pull request?
The pr aims to upgrade `commons-io` from `2.15.1` to `2.16.0`.

### Why are the changes needed?
1.2.15.1 vs 2.16.0
apache/commons-io@rel/commons-io-2.15.1...rel/commons-io-2.16.0

2.The version fix some bugs:
apache/commons-io#525
apache/commons-io#521

### Does this PR introduce _any_ user-facing change?
No.

### How was this patch tested?
Pass GA.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#45781 from panbingkun/SPARK-47656.

Authored-by: panbingkun <panbingkun@baidu.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants