diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2016-02-24 21:30:35 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2016-02-24 21:30:35 (GMT) |
commit | 337e62226ca69fea7a467ef1052a96a0015b1305 (patch) | |
tree | 9f346a45ae436099e1fa00acfccf597dbdbf56a0 /src/H5Ocache.c | |
parent | 016ebfcdf247eb1b63b116babf054d2252245086 (diff) | |
download | hdf5-337e62226ca69fea7a467ef1052a96a0015b1305.zip hdf5-337e62226ca69fea7a467ef1052a96a0015b1305.tar.gz hdf5-337e62226ca69fea7a467ef1052a96a0015b1305.tar.bz2 |
[svn-r29202] Fix for unknown message HDFFV-9697.
Tested on jam, ostrich, platypus, kite, quail, osx1010test, emu, mayll, moohan.
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r-- | src/H5Ocache.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c index 945d12e..f74966e 100644 --- a/src/H5Ocache.c +++ b/src/H5Ocache.c @@ -1149,10 +1149,6 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image else id = *chunk_image++; - /* Check for unknown message ID getting encoded in file */ - if(id >= H5O_UNKNOWN_ID) - HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "'unknown' message ID encoded in file?!?") - /* Message size */ UINT16DECODE(chunk_image, mesg_size); HDassert(mesg_size == H5O_ALIGN_OH(oh, mesg_size)); @@ -1222,8 +1218,13 @@ H5O__chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image /* Point unknown messages at 'unknown' message class */ /* (Usually from future versions of the library) */ - if(id >= NELMTS(H5O_msg_class_g) || NULL == H5O_msg_class_g[id]) { - H5O_unknown_t *unknown; /* Pointer to "unknown" message info */ + if(id >= H5O_UNKNOWN_ID || +#ifdef H5O_ENABLE_BOGUS + id == H5O_BOGUS_VALID_ID || +#endif + NULL == H5O_msg_class_g[id]) { + + H5O_unknown_t *unknown; /* Pointer to "unknown" message info */ /* Allocate "unknown" message info */ if(NULL == (unknown = H5FL_MALLOC(H5O_unknown_t))) |