summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-17 01:28:27 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2018-07-26 22:19:43 (GMT)
commit992a199f90fec31e0ad72ed76ed279a3ccea59e4 (patch)
tree5f78d2369eac465e6d28dc9366ae848cba2ba87b /src/H5Ocache.c
parent08e71a98e92367d976a65e947775b6b7862dfe8b (diff)
downloadhdf5-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/H5Ocache.c')
-rw-r--r--src/H5Ocache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index d65942b..59e1705 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -1553,6 +1553,8 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image
/* Set object header values */
oh->has_refcount_msg = TRUE;
+ if(!refcount)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't decode refcount")
oh->nlink = *refcount;
} /* end if */
/* Check if message is a link message */