diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-03-23 04:18:59 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2012-03-23 04:18:59 (GMT) |
commit | 213ab6eb36e398b5d0db55df002875ffcdeb4122 (patch) | |
tree | 526e07f3f28faafd10a517a043347f3fa26e4be7 /hl/fortran/src/H5DSfc.c | |
parent | 19a6303205d070f62f2579168397579001a38fe5 (diff) | |
download | hdf5-213ab6eb36e398b5d0db55df002875ffcdeb4122.zip hdf5-213ab6eb36e398b5d0db55df002875ffcdeb4122.tar.gz hdf5-213ab6eb36e398b5d0db55df002875ffcdeb4122.tar.bz2 |
[svn-r22129] HDFFV-7777: Fix for removing NULL character from fortran string in h5lt_get_attribute_string_f
Fixed size +1 error in HD5f2cstring
Diffstat (limited to 'hl/fortran/src/H5DSfc.c')
-rwxr-xr-x | hl/fortran/src/H5DSfc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hl/fortran/src/H5DSfc.c b/hl/fortran/src/H5DSfc.c index 6816347..3135cfa 100755 --- a/hl/fortran/src/H5DSfc.c +++ b/hl/fortran/src/H5DSfc.c @@ -283,7 +283,7 @@ nh5dsget_label_c(hid_t_f *did, int_f *idx, _fcd label, size_t_f *size) * Convert C name to FORTRAN and place it in the given buffer */ - HD5packFstring(c_label, _fcdtocp(label), (size_t)*size+1); + HD5packFstring(c_label, _fcdtocp(label), (size_t)*size); done: *size = (size_t_f)size_c; /* Don't subtract '1' because H5DSget_label doesn't include the @@ -332,7 +332,7 @@ nh5dsget_scale_name_c(hid_t_f *did, _fcd name, size_t_f *size) * Convert C name to FORTRAN and place it in the given buffer */ if(size_c != 0) { - HD5packFstring(c_scale_name, _fcdtocp(name), (size_t)*size+1); + HD5packFstring(c_scale_name, _fcdtocp(name), (size_t)*size); *size = (size_t_f)size_c-1; /* (-1) because we don't include the NULL ending in the length*/ } else { *size = (size_t_f)size_c; /* if NULL then no name was found */ |