diff options
author | Larry Knox <lrknox@hdfgroup.org> | 2021-10-15 03:10:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 03:10:00 (GMT) |
commit | cd371aaf609753d162afd8c6b0dd9b8128088a0e (patch) | |
tree | 4f5fa7970898b72f38815836269194807ebbf7f5 /src/H5Oint.c | |
parent | 69fcf58e7f329246c00fd40aa35a02d7e1919b7d (diff) | |
download | hdf5-cd371aaf609753d162afd8c6b0dd9b8128088a0e.zip hdf5-cd371aaf609753d162afd8c6b0dd9b8128088a0e.tar.gz hdf5-cd371aaf609753d162afd8c6b0dd9b8128088a0e.tar.bz2 |
Fixed HDFFV-11150 (#356) (#1095)
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)
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Diffstat (limited to 'src/H5Oint.c')
-rw-r--r-- | src/H5Oint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Oint.c b/src/H5Oint.c index 9d3b5b3..4207b9f 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -2909,7 +2909,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--; |