summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-04-17 20:33:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-04-17 20:33:31 (GMT)
commit014319c70488e9d50848af147fdb4832d4e1b1c6 (patch)
treeaf3763a270c25480fe80153a61f272cf786b24ef
parent458a45b433528229f6dc29b52c841cfb3bfe8788 (diff)
downloadhdf5-014319c70488e9d50848af147fdb4832d4e1b1c6.zip
hdf5-014319c70488e9d50848af147fdb4832d4e1b1c6.tar.gz
hdf5-014319c70488e9d50848af147fdb4832d4e1b1c6.tar.bz2
[svn-r8380] Purpose:
Added new files Description: Corrected code to issue an error when an attribute's dataspace is not able to be understood by the library. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest Misc. update:
-rw-r--r--src/H5Oattr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index a75c127..f5bd52b 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -195,9 +195,9 @@ H5O_attr_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p, H5O_shared_t UNUSED *
nelem*=attr->ds->extent.u.simple.size[u];
attr->ds->extent.nelem = nelem;
} else {
- attr->ds->extent.type = H5S_SCALAR;
- attr->ds->extent.nelem = 1;
+ HGOTO_ERROR(H5E_ATTR, H5E_CANTDECODE, NULL, "can't decode attribute dataspace");
}
+
/* Default to entire dataspace being selected */
if(H5S_select_all(attr->ds,0)<0)
HGOTO_ERROR (H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection");