summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Af.c
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2008-05-15 20:10:41 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2008-05-15 20:10:41 (GMT)
commit89276c0f7ec82073e168d25427b9fdbe90e273e9 (patch)
treec16b80fc6984fdcfcb586d2b3720d3a4e66e54d0 /fortran/src/H5Af.c
parentd7751c5f8cd6a1db8697712b174aae4a1eb00802 (diff)
downloadhdf5-89276c0f7ec82073e168d25427b9fdbe90e273e9.zip
hdf5-89276c0f7ec82073e168d25427b9fdbe90e273e9.tar.gz
hdf5-89276c0f7ec82073e168d25427b9fdbe90e273e9.tar.bz2
[svn-r15010] Purpose:
Fixed validation failure when compiled with -i8 and the g95 compiler Description: Fixed "off by one error" when converting C character buffer into fortran character buffer in h5aget_name_by_idx_c
Diffstat (limited to 'fortran/src/H5Af.c')
-rw-r--r--fortran/src/H5Af.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 4eab9c9..271cc87 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -1285,21 +1285,17 @@ nh5aget_name_by_idx_c (hid_t_f *loc_id, _fcd obj_name, size_t_f *obj_namelen,
c_buf_size = (size_t)*size + 1;
c_buf = (char *)HDmalloc(c_buf_size);
if (c_buf == NULL) return ret_value;
-
/*
* Call H5Aget_name_by_idx function.
*/
c_size = H5Aget_name_by_idx((hid_t)*loc_id, c_obj_name, c_idx_type, c_order, (hsize_t)*n, c_buf, c_buf_size,(hid_t)*lapl_id);
-
-/* printf( "In C routine, The attr name is %s %i \n ", c_buf, c_buf_size ); */
-/* printf( "In C routine, The c_size is %i \n ", c_size ); */
if (c_size < 0) goto done;
/*
* Convert C name to FORTRAN and place it in the given buffer
*/
- HD5packFstring(c_buf, _fcdtocp(name), c_buf_size);
+ HD5packFstring(c_buf, _fcdtocp(name), c_buf_size-1);
*size = (size_t_f)c_size;
ret_value = 0;