diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2005-06-14 21:18:32 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2005-06-14 21:18:32 (GMT) |
commit | 7e7dd03a329f692507203f6cda87fe6f67b86ac7 (patch) | |
tree | c928635641c06760ceb52d9dbdfd3acd62d00130 /src/H5Topaque.c | |
parent | 162b19cd6c1f6c6b14254c60b83bd14b1c11184c (diff) | |
download | hdf5-7e7dd03a329f692507203f6cda87fe6f67b86ac7.zip hdf5-7e7dd03a329f692507203f6cda87fe6f67b86ac7.tar.gz hdf5-7e7dd03a329f692507203f6cda87fe6f67b86ac7.tar.bz2 |
[svn-r10920] Purpose:
Bug fix
Description:
Add check for opaque tags that are too long for file format to handle
currently.
Platforms tested:
FreeBSD 4.11 (sleipnir)
Too minor to require h5commmitest
Diffstat (limited to 'src/H5Topaque.c')
-rw-r--r-- | src/H5Topaque.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5Topaque.c b/src/H5Topaque.c index 58535a2..0121957 100644 --- a/src/H5Topaque.c +++ b/src/H5Topaque.c @@ -86,6 +86,8 @@ H5Tset_tag(hid_t type_id, const char *tag) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not an opaque data type") if (!tag) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no tag") + if (HDstrlen(tag) >= H5T_OPAQUE_TAG_MAX) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "tag too long") /* Commit */ H5MM_xfree(dt->shared->u.opaque.tag); |