diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-03-25 15:25:22 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2013-03-25 15:25:22 (GMT) |
commit | dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4 (patch) | |
tree | 963a5b4952cbb88253df8850d1cc19d70b6f614c /src/H5.c | |
parent | ebb80dbae183e75ccf90f899f3ee1491946f93ec (diff) | |
parent | 6e1122dda4e446f6e9ad9ce4a9c2da8d40e441e3 (diff) | |
download | hdf5-dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4.zip hdf5-dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4.tar.gz hdf5-dbdedfdd2e5812b3c1d97e2f1f7361684db2d8e4.tar.bz2 |
[svn-r23443] merged from trunk
Diffstat (limited to 'src/H5.c')
-rw-r--r-- | src/H5.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -717,14 +717,14 @@ H5check_version(unsigned majnum, unsigned minnum, unsigned relnum) if (!disable_version_check){ /* - *verify if H5_VERS_INFO is consistent with the other version information. - *Check only the first sizeof(lib_str) char. Assume the information - *will fit within this size or enough significance. + * Verify if H5_VERS_INFO is consistent with the other version information. + * Check only the first sizeof(lib_str) char. Assume the information + * will fit within this size or enough significance. */ - sprintf(lib_str, "HDF5 library version: %d.%d.%d", + HDsnprintf(lib_str, sizeof(lib_str), "HDF5 library version: %d.%d.%d", H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); if(*substr) { - HDstrcat(lib_str, "-"); + HDstrncat(lib_str, "-", 1); HDstrncat(lib_str, substr, (sizeof(lib_str) - HDstrlen(lib_str)) - 1); } /* end if */ if (HDstrcmp(lib_str, H5_lib_vers_info_g)){ |