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

Roaring64Map::readSafe: Check against maxbytes to read the size of the map #384

Merged
merged 1 commit into from
Aug 26, 2022

Conversation

SLieve
Copy link
Contributor

@SLieve SLieve commented Aug 26, 2022

Previously, readSafe did not check whether it could read the map size in the allotted maxbytes. In addition, it did not subtract the map size from maxbytes when reading.

This fixes the above and adds some deserialization tests using binary files. The valid files were produced with the script in tests/cpp_unit_util.cpp. The invalid files were created manually.

Previously, readSafe did not check whether it could read the map size in
the allotted maxbytes. In addition, it did not subtract the map size from
maxbytes when reading.

This fixes the above and adds some deserialization tests using binary
files. The valid files were produced with the script in
tests/cpp_unit_util.cpp. The invalid files were created manually.
@lemire
Copy link
Member

lemire commented Aug 26, 2022

Love it!

@lemire lemire merged commit efcb83d into RoaringBitmap:master Aug 26, 2022
@SLieve SLieve deleted the read_safe branch August 26, 2022 17:50
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