summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-17 03:12:21 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-17 03:12:21 (GMT)
commit8a504025690129d1d952b06bc4c757f4fcc34548 (patch)
tree44dac7e9a017eaee93b9abe4fee19f9d9ea5ab6c /src/H5Shyper.c
parentb888763b6d49546d828beba3e83db10bb12c455b (diff)
parentfe916ada370f33b48b3c39dbf9e3ff73df00fdb7 (diff)
downloadhdf5-8a504025690129d1d952b06bc4c757f4fcc34548.zip
hdf5-8a504025690129d1d952b06bc4c757f4fcc34548.tar.gz
hdf5-8a504025690129d1d952b06bc4c757f4fcc34548.tar.bz2
Merge pull request #1139 in HDFFV/hdf5 from ~BMRIBLER/hdf5_bmr_cpp4:develop to develop
Fixed HDFFV-10476, HDFFV-10478, HDFFV-10480 * commit 'fe916ada370f33b48b3c39dbf9e3ff73df00fdb7': Removed white space Fixed HDFFV-10476, HDFFV-10478, HDFFV-10480 Description: Fixed potential out of bound read and NULL pointer dereferences. Platforms tested: Linux/64 (jelly) Linux/32 (jam) Darwin (osx1010test)
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 5653209..7a6d1be 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -5903,7 +5903,8 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride
last_span = NULL;
/* Generate all the span segments for this dimension */
- for(u = 0, stride_iter = 0; u < count[i]; u++, stride_iter += stride[i]) {
+ for(u = 0, stride_iter = 0; u < count[i]; u++, stride_iter += stride[i])
+ {
H5S_hyper_span_t *span; /* New hyperslab span */
/* Allocate a span node */
@@ -5945,7 +5946,8 @@ H5S__hyper_make_spans(unsigned rank, const hsize_t *start, const hsize_t *stride
} /* end for */
/* Indicate that there is a pointer to this tree */
- down->count = 1;
+ if(down)
+ down->count = 1;
/* Success! Return the head of the list in the slowest changing dimension */
ret_value = down;