summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2022-08-16 21:08:52 (GMT)
committerGitHub <noreply@github.com>2022-08-16 21:08:52 (GMT)
commitd9247ec17e8abe53af0a439e1a1b58ade6ae5310 (patch)
tree98c7f123dfde1eedb02575eaf64f989bcf2ba724 /src/H5Fsuper.c
parent75baddbf62ae87c09a9654c4398408752cc9236b (diff)
downloadhdf5-d9247ec17e8abe53af0a439e1a1b58ade6ae5310.zip
hdf5-d9247ec17e8abe53af0a439e1a1b58ade6ae5310.tar.gz
hdf5-d9247ec17e8abe53af0a439e1a1b58ade6ae5310.tar.bz2
[1.12 Merge] Hdf5 1 12 develop merges (#2012)
* Fix invalid comment about character encoding in H5Fint.c (#1845) * 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> * Avoid allocating chunk map for contiguous and compact dataset I/O (#1927) * Add documentation for parallel compression feature (#1981) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/H5Fsuper.c')
-rw-r--r--src/H5Fsuper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 6f6df96..62d0398 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -686,7 +686,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.