Skip to content

Fix Centroid Count OOM Crash - #119

Open
domhauton wants to merge 3 commits into
tdunning:mainfrom
domhauton:centroid-count-sanity-check
Open

Fix Centroid Count OOM Crash#119
domhauton wants to merge 3 commits into
tdunning:mainfrom
domhauton:centroid-count-sanity-check

Conversation

@domhauton

Copy link
Copy Markdown

When passing in data with a very high centroid count the code creates an array of the requested size. If the data is malformed or invalid, this can lead to very large data structures being created that cause the application to run out of memory and crash.

This change performs a sanity check before deserialising a AVLTree to confirm the requested number of centroids is lower or equal to the amount of data remaining in the buffer.

@domhauton domhauton changed the title Fix Centroid Count OOM Crash [WIP] Fix Centroid Count OOM Crash Dec 11, 2018
@domhauton domhauton changed the title [WIP] Fix Centroid Count OOM Crash Fix Centroid Count OOM Crash Dec 11, 2018
@domhauton

Copy link
Copy Markdown
Author

Double checked all of the failing tests in CI, none are related to the code change made.

Base automatically changed from master to main January 18, 2021 06:15
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.

1 participant