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

Added error handling for laz decompression errors. #58

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

floriankramer
Copy link
Contributor

The library currently panics when loading a malformed laz file. This pr turns the panic into an error.

Copy link
Owner

@gadomski gadomski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo, good catch, thanks! Any chance you have an example file we could use in a test case?

@floriankramer
Copy link
Contributor Author

I can't give you the files I had issues on, but I guess just truncating a laz file to e.g. half size should do the trick (as the error returned is there being not enough data to fill a full laz data chunk).

Copy link
Owner

@gadomski gadomski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't easily generate a file so we'll yolo w/o test.

@gadomski gadomski merged commit a8279c1 into gadomski:main Mar 14, 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.

None yet

2 participants