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

Fix H5Zzstd error reporting and decompressed size behavior #1151

Merged
merged 4 commits into from
Jun 2, 2024

Conversation

mkitti
Copy link
Member

@mkitti mkitti commented May 26, 2024

JuliaIO/JLD2.jl#560 revealed that error reporting was not occuring when there were errors present.

  1. ZSTD_getDecompressedSize can result in an error, resulting in a return value of 0.
  2. Libc.malloc(0) may not return a null pointer.

Therefore we need to check the return value of ZSTD_getDecompressedSize directly before
trying to malloc.

Also improve error handing overall.

@mkitti
Copy link
Member Author

mkitti commented May 26, 2024

Also note that ZSTD_getDecompressedSize is deprecated.

@mkitti mkitti marked this pull request as ready for review June 2, 2024 21:52
@mkitti mkitti merged commit 34bf471 into JuliaIO:master Jun 2, 2024
20 checks passed
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