summaryrefslogtreecommitdiffstats
path: root/src/H5Ocache.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-06 15:50:51 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-06 15:50:51 (GMT)
commit2f9851501959a64fb092b599041e0d9ecc63f6f8 (patch)
tree30eecfd6e85b4236309260ebd63df1a614effdb1 /src/H5Ocache.c
parent509b8f645deadb880ea09ca5d89f9a28526d78ec (diff)
downloadhdf5-2f9851501959a64fb092b599041e0d9ecc63f6f8.zip
hdf5-2f9851501959a64fb092b599041e0d9ecc63f6f8.tar.gz
hdf5-2f9851501959a64fb092b599041e0d9ecc63f6f8.tar.bz2
[svn-r13466] Description:
Add some extra sanity checking to object header status flags read from file. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5Ocache.c')
-rw-r--r--src/H5Ocache.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5Ocache.c b/src/H5Ocache.c
index 48e3a6d..7d096d5 100644
--- a/src/H5Ocache.c
+++ b/src/H5Ocache.c
@@ -48,6 +48,9 @@
* extra I/O operations) */
#define H5O_SPEC_READ_SIZE 512
+/* All the object header status flags that this version of the library knows about */
+#define H5O_HDR_ALL_FLAGS (H5O_HDR_ATTR_CRT_ORDER_TRACKED | H5O_HDR_ATTR_CRT_ORDER_INDEXED | H5O_HDR_STORE_TIMES)
+
/******************/
/* Local Typedefs */
@@ -276,6 +279,8 @@ H5O_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, const void UNUSED * _udata1,
/* Flags */
oh->flags = *p++;
+ if(oh->flags & ~H5O_HDR_ALL_FLAGS)
+ HGOTO_ERROR(H5E_OHDR, H5E_VERSION, NULL, "unknown object header status flag(s)")
} /* end if */
else {
/* Version */