diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-08-19 19:42:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-08-19 19:42:11 (GMT) |
commit | 7637f1b521d6f70dbdeb57588cfe79d929d37f98 (patch) | |
tree | c9a32f4c13864d8248bdda956260bc29f1a6bf27 /test/links.c | |
parent | 4b141cbc6a55a02b3191db75ef40450d4bc9d92d (diff) | |
download | hdf5-7637f1b521d6f70dbdeb57588cfe79d929d37f98.zip hdf5-7637f1b521d6f70dbdeb57588cfe79d929d37f98.tar.gz hdf5-7637f1b521d6f70dbdeb57588cfe79d929d37f98.tar.bz2 |
[svn-r15489] Description:
Bring rev. 15488 back from trunk:
Fix bug where library could core dump when an invalid location ID was
passed to H5Giterate() (and add test for this case).
Tested on:
Mac OS X/32 10.5.4 (amazon)
Too minor to require h5committest
Diffstat (limited to 'test/links.c')
-rw-r--r-- | test/links.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/links.c b/test/links.c index 9dcd810..70bd3d2 100644 --- a/test/links.c +++ b/test/links.c @@ -9734,6 +9734,20 @@ link_iterate_old_check(hid_t group_id, H5_iter_order_t order, } H5E_END_TRY; if(ret >= 0) TEST_ERROR + /* Check for iteration w/bad location ID */ + skip = 0; + H5E_BEGIN_TRY { + ret = H5Literate((-1), H5_INDEX_NAME, order, &skip, link_iterate_fail_cb, NULL); + } H5E_END_TRY; + if(ret >= 0) TEST_ERROR + +#ifndef H5_NO_DEPRECATED_SYMBOLS + H5E_BEGIN_TRY { + ret = H5Giterate((-1), ".", &gskip, group_iterate_old_cb, iter_info); + } H5E_END_TRY; + if(ret >= 0) TEST_ERROR +#endif /* H5_NO_DEPRECATED_SYMBOLS */ + /* Success */ return(0); |