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 memory leaks and aborts in H5O EFL decode #2708

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

derobins
Copy link
Member

  • Convert asserts to error handling in efl decode

The function that decodes external data files object header messages would call assert() when parsing malformed files, causing applications to crash when linked against the debug library.

This change converts these assert() calls to HDF5 error checks, so the messages are sanity checked in both release and debug mode and debug mode no longer crashes applications.

Also cleaned up some error handling usage and debug checks.

  • Free memory on H5O efl decode errors

  • Add buffer size checks to efl msg decode

  • Add parentheses to math expressions

Fixes GitHub #2605

* Convert asserts to error handling in efl decode

The function that decodes external data files object header messages
would call assert() when parsing malformed files, causing applications
to crash when linked against the debug library.

This change converts these assert() calls to HDF5 error checks, so
the messages are sanity checked in both release and debug mode and
debug mode no longer crashes applications.

Also cleaned up some error handling usage and debug checks.

* Free memory on H5O efl decode errors

* Add buffer size checks to efl msg decode

* Add parentheses to math expressions

Fixes GitHub HDFGroup#2605
@derobins derobins added Merge Use this label when a PR is for a downstream merge Priority - 1. High 🔼 These are important issues that should be resolved in the next release Component - C Library Core C library issues (usually in the src directory) Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub Branch - 1.10 labels Apr 12, 2023
@derobins derobins changed the title Fix memory leaks and aborts in H5O EFL decode (#2656) Fix memory leaks and aborts in H5O EFL decode Apr 12, 2023
@derobins derobins merged commit 463677e into HDFGroup:hdf5_1_10 Apr 13, 2023
@derobins derobins deleted the 1_10_2605 branch March 27, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - C Library Core C library issues (usually in the src directory) Merge Use this label when a PR is for a downstream merge Priority - 1. High 🔼 These are important issues that should be resolved in the next release Type - Bug Please report security issues to help@hdfgroup.org instead of creating an issue on GitHub
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants