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

Potential overflow when decoding in RoaringBitmap::deserialize_from_impl() #270

Closed
kirk-baird opened this issue Apr 8, 2024 · 1 comment
Labels

Comments

@kirk-baird
Copy link
Contributor

What is the issue

There is an overflow in deserialize_from_impl() that can be reached if s + len overflow a u16.

The overflow is reachable as both s and len are decoded from user input.

Noting in release mode this will wrapping overflow and not cause a panic. However, a panic would occur in debug mode.

What is the solution

Use checked math and propagate the error.

@Kerollmops
Copy link
Member

Closed by #271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants