summaryrefslogtreecommitdiffstats
path: root/hl/test/test_ds.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2011-07-31 00:46:37 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2011-07-31 00:46:37 (GMT)
commit3dc16eb5bdc50de04974fec8db6ec0fa14b8ae6c (patch)
treeb50cca56bbce38623d35b6e9c0713ac3795dbb7c /hl/test/test_ds.c
parent74cf7b79a5e3950b5aa6c42c6e807760a7e94ac8 (diff)
downloadhdf5-3dc16eb5bdc50de04974fec8db6ec0fa14b8ae6c.zip
hdf5-3dc16eb5bdc50de04974fec8db6ec0fa14b8ae6c.tar.gz
hdf5-3dc16eb5bdc50de04974fec8db6ec0fa14b8ae6c.tar.bz2
[svn-r21157] Description: JIRA HDFFV-7673: fixed segfault when retrieving the length of a
a dimension scale that does not exist. Implemented a test for the situation and added an if condition depending on if the label name exists. Tested: jam (gnu and intel)
Diffstat (limited to 'hl/test/test_ds.c')
-rw-r--r--hl/test/test_ds.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/hl/test/test_ds.c b/hl/test/test_ds.c
index 7937a5e..2be3d60 100644
--- a/hl/test/test_ds.c
+++ b/hl/test/test_ds.c
@@ -3138,6 +3138,11 @@ static int test_simple(void)
if(H5DSset_label(did,DIM0,DIM0_LABEL) < 0)
goto out;
+
+ /* check getting a label which does not exist */
+ if(H5DSget_label(did,DIM1,dim1_label,sizeof(dim1_label)) != 0)
+ goto out;
+
if(H5DSset_label(did,DIM1,DIM1_LABEL) < 0)
goto out;