diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-07-30 20:56:39 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-07-30 20:56:39 (GMT) |
commit | 1c344bb6c448523ed3197e9b1f9d5436f3aee4be (patch) | |
tree | 8e6bec6c76e747a79f06bced2494f6fc634b90b5 /src/H5Oshared.c | |
parent | 98fe6b1b2e32c701e0d84b0ff128b10511aaba6c (diff) | |
download | hdf5-1c344bb6c448523ed3197e9b1f9d5436f3aee4be.zip hdf5-1c344bb6c448523ed3197e9b1f9d5436f3aee4be.tar.gz hdf5-1c344bb6c448523ed3197e9b1f9d5436f3aee4be.tar.bz2 |
[svn-r14028] Description:
Add more error checking for reading a shared message (i.e. named
datatype) that might not be understandable (probably from being stored with
a later version of the library).
Tested on:
FreeBSD/32 6.2 (duty) w/compatibility tests
Diffstat (limited to 'src/H5Oshared.c')
-rw-r--r-- | src/H5Oshared.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c index 0f1da5e..867248f 100644 --- a/src/H5Oshared.c +++ b/src/H5Oshared.c @@ -104,9 +104,10 @@ H5O_shared_read(H5F_t *f, hid_t dxpl_id, H5O_shared_t *shared, const H5O_msg_cla HDassert(type); /* Get the shared message */ - ret_value = H5O_read_real(&(shared->ent), type, 0, mesg, dxpl_id); + if(NULL == (ret_value = H5O_read_real(&(shared->ent), type, 0, mesg, dxpl_id))) + HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to retrieve shared message") if(type->set_share && (type->set_share)(f, ret_value, shared) < 0) - HGOTO_ERROR (H5E_OHDR, H5E_CANTINIT, NULL, "unable to set sharing information") + HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to set sharing information") done: FUNC_LEAVE_NOAPI(ret_value) |