summaryrefslogtreecommitdiffstats
path: root/src/H5C.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2016-02-18 20:50:37 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2016-02-18 20:50:37 (GMT)
commit70ad55b1052e018acd90b22ab44260a8a1721e0b (patch)
tree5211dad79d57dcc3875f443557918db8a1b5c6a6 /src/H5C.c
parentb3df4e9c8d716db4ea2680f6bb4ac16d1084dea5 (diff)
downloadhdf5-70ad55b1052e018acd90b22ab44260a8a1721e0b.zip
hdf5-70ad55b1052e018acd90b22ab44260a8a1721e0b.tar.gz
hdf5-70ad55b1052e018acd90b22ab44260a8a1721e0b.tar.bz2
[svn-r29150] fix for Jira issue 9670 - HDF5 segfaults on corrupted file.
Change compare callback in Btree2 class to correctly account for errors. tested on bb-8.
Diffstat (limited to 'src/H5C.c')
-rw-r--r--src/H5C.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/H5C.c b/src/H5C.c
index 37b0df2..97ce4c6 100644
--- a/src/H5C.c
+++ b/src/H5C.c
@@ -2807,16 +2807,12 @@ H5C_protect(H5F_t * f,
hit = FALSE;
- thing = H5C_load_entry(f, dxpl_id,
+ if(NULL == (thing = H5C_load_entry(f, dxpl_id,
#ifdef H5_HAVE_PARALLEL
- coll_access,
+ coll_access,
#endif /* H5_HAVE_PARALLEL */
- type, addr, udata);
-
- if ( thing == NULL ) {
-
+ type, addr, udata)))
HGOTO_ERROR(H5E_CACHE, H5E_CANTLOAD, NULL, "can't load entry")
- }
entry_ptr = (H5C_cache_entry_t *)thing;
entry_ptr->ring = ring;