diff options
author | kmu <kmu@hdfgroup.org> | 2019-12-11 16:44:56 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2020-05-20 14:20:25 (GMT) |
commit | 95e509db46c7007561a38fcfe76c38d91ea79e49 (patch) | |
tree | e3c7e721d6f15b3ac28c4d8e0db27e4fb95c0c6c /src/H5B2cache.c | |
parent | 9281d24a5bd5cb3ee3cde77a7d1e5e69ef05aa62 (diff) | |
download | hdf5-95e509db46c7007561a38fcfe76c38d91ea79e49.zip hdf5-95e509db46c7007561a38fcfe76c38d91ea79e49.tar.gz hdf5-95e509db46c7007561a38fcfe76c38d91ea79e49.tar.bz2 |
fix and address comments
Diffstat (limited to 'src/H5B2cache.c')
-rw-r--r-- | src/H5B2cache.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5B2cache.c b/src/H5B2cache.c index 2baac85..7ce4b99 100644 --- a/src/H5B2cache.c +++ b/src/H5B2cache.c @@ -401,6 +401,7 @@ H5B2__cache_hdr_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le *image++ = H5B2_HDR_VERSION; /* B-tree type */ + HDassert(hdr->cls->id <= 255); *image++ = (uint8_t)hdr->cls->id; /* Node size (in bytes) */ @@ -821,6 +822,7 @@ H5B2__cache_int_serialize(const H5F_t *f, void *_image, size_t H5_ATTR_UNUSED le *image++ = H5B2_INT_VERSION; /* B-tree type */ + HDassert(internal->hdr->cls->id <= 255); *image++ = (uint8_t)internal->hdr->cls->id; HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_INT_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM)); @@ -1222,6 +1224,7 @@ H5B2__cache_leaf_serialize(const H5F_t H5_ATTR_UNUSED *f, void *_image, size_t H *image++ = H5B2_LEAF_VERSION; /* B-tree type */ + HDassert(leaf->hdr->cls->id <= 255); *image++ = (uint8_t)leaf->hdr->cls->id; HDassert((size_t)(image - (uint8_t *)_image) == (H5B2_LEAF_PREFIX_SIZE - H5B2_SIZEOF_CHKSUM)); |