summaryrefslogtreecommitdiffstats
path: root/src/H5Oint.c
diff options
context:
space:
mode:
authorbmribler <39579120+bmribler@users.noreply.github.com>2021-02-19 19:01:44 (GMT)
committerGitHub <noreply@github.com>2021-02-19 19:01:44 (GMT)
commit99669024ff93df3ade5b8a1e6eee8bef6df57161 (patch)
tree0262c13578a938db102b409a2d9f3b2305a3e15a /src/H5Oint.c
parent5f015f474250cb632890e3ddc8d12461c0e2a476 (diff)
downloadhdf5-99669024ff93df3ade5b8a1e6eee8bef6df57161.zip
hdf5-99669024ff93df3ade5b8a1e6eee8bef6df57161.tar.gz
hdf5-99669024ff93df3ade5b8a1e6eee8bef6df57161.tar.bz2
Fixed HDFFV-11150 (#356)
Description Replaced an HDassert with a check for null pointer in H5O_dec_rc() to catch null pointer in corrupted data situation. As a result, removed the null check prior to H5O_dec_rc() calls. Platforms tested: Linux/64 (jelly)
Diffstat (limited to 'src/H5Oint.c')
-rw-r--r--src/H5Oint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Oint.c b/src/H5Oint.c
index 44148e6..5fa9c6a 100644
--- a/src/H5Oint.c
+++ b/src/H5Oint.c
@@ -2923,7 +2923,8 @@ H5O__dec_rc(H5O_t *oh)
FUNC_ENTER_PACKAGE
/* check args */
- HDassert(oh);
+ if (!oh)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid object header")
/* Decrement reference count */
oh->rc--;