summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-03-24 17:13:26 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-03-24 17:13:26 (GMT)
commit08d0edb920ae93f4d2494831479ad6200ff208b5 (patch)
tree226266761dc3b36ab5608ccada6a096184a51326 /test
parent37a019593a4b6e2ab76eab140e3c66fff2625d23 (diff)
downloadhdf5-08d0edb920ae93f4d2494831479ad6200ff208b5.zip
hdf5-08d0edb920ae93f4d2494831479ad6200ff208b5.tar.gz
hdf5-08d0edb920ae93f4d2494831479ad6200ff208b5.tar.bz2
[svn-r26556] Merge the fix for HDFFV-9173 from trunk to 1_8:
H5Pset_istore_k() will validate the "ik" value to not exceed the max v1 btree entries (2 bytes) The same check for H5Pset_sym_k() "ik" value. h5committested.
Diffstat (limited to 'test')
-rw-r--r--test/tmisc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index e4322a2..45e85cc 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -1865,9 +1865,21 @@ test_misc11(void)
ret = H5Pset_sizes(fcpl, (size_t)MISC11_SIZEOF_OFF, (size_t)MISC11_SIZEOF_LEN);
CHECK(ret, FAIL, "H5Pset_sizes");
+ /* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
+ H5E_BEGIN_TRY {
+ ret=H5Pset_sym_k(fcpl, 32770, 0);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Pset_sym_k");
+
ret=H5Pset_sym_k(fcpl,MISC11_SYM_IK,MISC11_SYM_LK);
CHECK(ret, FAIL, "H5Pset_sym_k");
+ /* This should fail as (32770*2) will exceed ^16 - 2 bytes for storing btree entries */
+ H5E_BEGIN_TRY {
+ ret=H5Pset_istore_k(fcpl, 32770);
+ } H5E_END_TRY;
+ VERIFY(ret, FAIL, "H5Pset_istore_k");
+
ret=H5Pset_istore_k(fcpl,MISC11_ISTORE_IK);
CHECK(ret, FAIL, "H5Pset_istore_k");