commit b1eb1b3ee8693e2a56b074315b521c66255acca1 Author: Neil Fortner <nfortne2@hdfgroup.org> Date: Thu Sep 1 17:24:24 2016 -0500 Replace assertion in H5O_dtype_decode_helper for number of array dimensions with a check and error. The assertion was inappropriate because it is operating on data read from the file, which the library does not always have direct control of. Index: hdf5/src/H5Odtype.c =================================================================== --- hdf5.orig/src/H5Odtype.c +++ hdf5/src/H5Odtype.c @@ -518,7 +518,8 @@ H5O_dtype_decode_helper(H5F_t *f, unsign dt->shared->u.array.ndims = *(*pp)++; /* Double-check the number of dimensions */ - HDassert(dt->shared->u.array.ndims <= H5S_MAX_RANK); + if(dt->shared->u.array.ndims > H5S_MAX_RANK) + HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "too many dimensions for array datatype") /* Skip reserved bytes, if version has them */ if(version < H5O_DTYPE_VERSION_3)