summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2017-03-07 15:59:39 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2017-03-07 15:59:39 (GMT)
commitd5fea5b80a2ccc21fb4f187d0efeda80b9134156 (patch)
tree8cc95b236a40ce0567887d189bc077136cf0e2e6 /src/H5Ocache.c
parent503ab9d88d6fb4b0866cb8bb77ee1df68dd735c1 (diff)
downloadhdf5-d5fea5b80a2ccc21fb4f187d0efeda80b9134156.zip
hdf5-d5fea5b80a2ccc21fb4f187d0efeda80b9134156.tar.gz
hdf5-d5fea5b80a2ccc21fb4f187d0efeda80b9134156.tar.bz2
Bring fix for HDFFV-9697 from develop branch.
Populate the fix for HDFFV-9697: Fix for unknown message from develop branch. Tested on ostrich, platypus, kite, quail, osx1010test, emu, mayll, moohan, kituo.
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 2aaf933..0f22acb 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -1116,10 +1116,6 @@ H5O_chunk_deserialize(H5O_t *oh, haddr_t addr, size_t len, const uint8_t *image,
else
id = *p++;
- /* 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(p, mesg_size);
HDassert(mesg_size == H5O_ALIGN_OH(oh, mesg_size));
@@ -1193,7 +1189,12 @@ 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]) {
+ 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 */