diff options
author | jhendersonHDF <jhenderson@hdfgroup.org> | 2022-07-08 20:04:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-08 20:04:23 (GMT) |
commit | aa688c68c447c5739281f3733f31d891bcc934d0 (patch) | |
tree | 1d8f5571ff5ae13169166107aa449fef4b5f8629 /src | |
parent | a45ade88863e7e413ec408cdc62d60a1c1bc76a2 (diff) | |
download | hdf5-aa688c68c447c5739281f3733f31d891bcc934d0.zip hdf5-aa688c68c447c5739281f3733f31d891bcc934d0.tar.gz hdf5-aa688c68c447c5739281f3733f31d891bcc934d0.tar.bz2 |
Convert assertion on (possibly corrupt) file contents to normal error check (#1861)
* Convert assertion on (possibly corrupt) file contents to normal error check
* Committing clang-format changes
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Fsuper.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 4e4fe8d..6a82a6e 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -687,7 +687,9 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* Sanity check - superblock extension should only be defined for * superblock version >= 2. */ - HDassert(sblock->super_vers >= HDF5_SUPERBLOCK_VERSION_2); + if (sblock->super_vers < HDF5_SUPERBLOCK_VERSION_2) + HGOTO_ERROR(H5E_FILE, H5E_BADVALUE, FAIL, + "invalid superblock - extension message should not be defined for version < 2") /* Check for superblock extension being located "outside" the stored * 'eoa' value, which can occur with the split/multi VFD. |