diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2018-03-05 23:27:03 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2018-03-05 23:27:03 (GMT) |
commit | 4faf4d335b638215c2220564b894e909ff322ca8 (patch) | |
tree | 26e482e760346eae24a298e42d2153a9c4200431 /src | |
parent | 1e5b67c1dc8672206f2489854188f43a590aea14 (diff) | |
parent | 3b0e80c1dcdf664f56829383aa3bc9e8ecc0f2c6 (diff) | |
download | hdf5-4faf4d335b638215c2220564b894e909ff322ca8.zip hdf5-4faf4d335b638215c2220564b894e909ff322ca8.tar.gz hdf5-4faf4d335b638215c2220564b894e909ff322ca8.tar.bz2 |
Merge branch 'develop' into hdffv_10354
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/H5T.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index aaedfda..bf7fb07 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 3.2.2) +cmake_minimum_required (VERSION 3.3.2) PROJECT (HDF5_SRC C CXX) #----------------------------------------------------------------------------- @@ -5211,6 +5211,11 @@ H5T_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc) /* Check if the field changed size */ if(old_size != memb_type->shared->size) { + + /* Fail if the old_size is zero */ + if (0 == old_size) + HGOTO_ERROR(H5E_DATATYPE, H5E_BADVALUE, FAIL, "old_size of zero would cause division by zero"); + /* Adjust the size of the member */ dt->shared->u.compnd.memb[i].size = (dt->shared->u.compnd.memb[i].size*memb_type->shared->size)/old_size; |