Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fixed invalid argument validation in LZ4Codec #5

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

Merged
merged 1 commit into from
Mar 15, 2017
Merged

Fixed invalid argument validation in LZ4Codec #5

merged 1 commit into from
Mar 15, 2017

Conversation

AronParker
Copy link
Contributor

@AronParker AronParker commented Mar 14, 2017

Arguments from MessagePack.LZ4.CheckArguments(byte[], int, int, byte[], int, int) are validated incorrectly.

Case 1:

MessagePack.LZ4.CheckArguments(new byte[0], int.MaxValue, 1, new byte[0], int.MaxValue, 1);

Expected:
throw ArgumentOutOfRangeException

Actual:
no Exception thrown, because of overflow at inputOffset + inputLength.

Case 2:

MessagePack.LZ4.CheckArguments(new byte[0], 5, -5, new byte[0], 5, -5);

Expected:
throw ArgumentOutOfRangeException

Actual:
no Exception thrown, becauseinputOffset + inputLength == 0.

@neuecc neuecc merged commit a6f8339 into MessagePack-CSharp:master Mar 15, 2017
@neuecc
Copy link
Member

neuecc commented Mar 15, 2017

Thanks! nicely detected.

@AronParker
Copy link
Contributor Author

Love this Project! Keep up the great work! Will try to audit it entirely. =)

AbhitejJohn pushed a commit to AbhitejJohn/MessagePack-CSharp that referenced this pull request Dec 12, 2018
AArnott added a commit that referenced this pull request Mar 11, 2023
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
Morty Proxy This is a proxified and sanitized view of the page, visit original site.