summaryrefslogtreecommitdiffstats
path: root/src/H5Dselect.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2019-03-20 19:03:48 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2019-03-20 19:03:48 (GMT)
commit7add52ff4f2443357648d53d52add274d1b18b5f (patch)
tree7bfeb541f99b73c95288477e5fd1b84caef8bb01 /src/H5Dselect.c
parent55d1931dc6af168adc3804586a0da22287b29187 (diff)
downloadhdf5-7add52ff4f2443357648d53d52add274d1b18b5f.zip
hdf5-7add52ff4f2443357648d53d52add274d1b18b5f.tar.gz
hdf5-7add52ff4f2443357648d53d52add274d1b18b5f.tar.bz2
Fixed HDFFV-10210 and HDFFV-10587
Description: - Added parameter validation (HDFFV-10210) - Added detection of division by zero (HDFFV-10587 - CVE-2018-17438) - Fixed typos in various tests Platforms tested: Linux/64 (jelly) Linux/64 (platypus) Darwin (osx1011test)
Diffstat (limited to 'src/H5Dselect.c')
-rw-r--r--src/H5Dselect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Dselect.c b/src/H5Dselect.c
index 0ec3423..4ffce62 100644
--- a/src/H5Dselect.c
+++ b/src/H5Dselect.c
@@ -227,6 +227,8 @@ H5D__select_io(const H5D_io_info_t *io_info, size_t elmt_size,
/* Decrement number of elements left to process */
HDassert(((size_t)tmp_file_len % elmt_size) == 0);
+ if(elmt_size == 0)
+ HGOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "Resulted in division by zero")
nelmts -= ((size_t)tmp_file_len / elmt_size);
} /* end while */
} /* end else */