summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-17 01:28:27 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2018-07-17 01:28:27 (GMT)
commit073e0b1f0312ac93927e511e2c48d89728e91987 (patch)
tree735b8c9e1798a7163c300751829229c8e64799aa /src/H5Ocache.c
parent55666ace551369b3d72430c090ab9f1571e1be75 (diff)
downloadhdf5-073e0b1f0312ac93927e511e2c48d89728e91987.zip
hdf5-073e0b1f0312ac93927e511e2c48d89728e91987.tar.gz
hdf5-073e0b1f0312ac93927e511e2c48d89728e91987.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 */