diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2002-10-29 16:37:49 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2002-10-29 16:37:49 (GMT) |
commit | 67a679af07ec8a032f32fe54af84e673c0c3b3ae (patch) | |
tree | cf68f80b61684b9cf00409b84bb4eda1cb662acd /src/H5G.c | |
parent | 0d1aba339eb7f0fd53282412289226896df1e988 (diff) | |
download | hdf5-67a679af07ec8a032f32fe54af84e673c0c3b3ae.zip hdf5-67a679af07ec8a032f32fe54af84e673c0c3b3ae.tar.gz hdf5-67a679af07ec8a032f32fe54af84e673c0c3b3ae.tar.bz2 |
[svn-r6041]
Purpose:
Bug fix
Description:
#340 - get comment length for H5G;
#435 - H5Aget_storage_size;
#644 - H5Arename
Platforms tested:
eirene, arabica
Diffstat (limited to 'src/H5G.c')
-rw-r--r-- | src/H5G.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2415,7 +2415,8 @@ H5G_get_comment(H5G_entry_t *loc, const char *name, size_t bufsize, char *buf) buf[0] = '\0'; ret_value = 0; } else { - HDstrncpy(buf, comment.s, bufsize); + if(buf && bufsize) + HDstrncpy(buf, comment.s, bufsize); ret_value = (int)HDstrlen(comment.s); H5O_reset(H5O_NAME, &comment); } |