diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2018-07-17 01:28:27 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2018-07-26 22:19:43 (GMT) |
commit | 992a199f90fec31e0ad72ed76ed279a3ccea59e4 (patch) | |
tree | 5f78d2369eac465e6d28dc9366ae848cba2ba87b /src/H5Shyper.c | |
parent | 08e71a98e92367d976a65e947775b6b7862dfe8b (diff) | |
download | hdf5-992a199f90fec31e0ad72ed76ed279a3ccea59e4.zip hdf5-992a199f90fec31e0ad72ed76ed279a3ccea59e4.tar.gz hdf5-992a199f90fec31e0ad72ed76ed279a3ccea59e4.tar.bz2 |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c index c84d5f3..8e2e979 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -6082,7 +6082,7 @@ 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 */ @@ -6124,7 +6124,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; |