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

CHUNK_ID_XYZI voxel bounds check to improve handling of corrupt files #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dougbinks
Copy link
Collaborator

I've encountered a number of vox files which were corrupt with voxels outside the bounds of the model size. This results in the voxel array bounds being overwritten when loaded.

There's already an assert in the code, but this PR adds the same test to adding the voxel data to the array. I've been able to recover some data from models which otherwise would not load with this addition and I don't think the performance hit is significant.

@mgerhardy
Copy link
Collaborator

This is also part of #58 - with ogt_warn

@dougbinks
Copy link
Collaborator Author

Ah, I didn't spot that. This can be closed if you're intending to accept that change.

@mgerhardy
Copy link
Collaborator

Well, I would be thankful on your input on where I've added the ogt_warn stuff and where it still is ogt_assert. Not sure if my PR would get accepted that way. Let's see

@dougbinks
Copy link
Collaborator Author

I'll take a look soon.

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