diff options
author | MuQun Yang <ymuqun@hdfgroup.org> | 2000-12-22 19:03:00 (GMT) |
---|---|---|
committer | MuQun Yang <ymuqun@hdfgroup.org> | 2000-12-22 19:03:00 (GMT) |
commit | 7332a1934e1394770c98ba129d92cf2da467ab88 (patch) | |
tree | 1189309dac3bc2c48495e4f318cdfc8fb18efc2b /tools/h4toh5util.c | |
parent | ebe4c545e1f4286f7ddd6219bfdcf5d7c23d9364 (diff) | |
download | hdf5-7332a1934e1394770c98ba129d92cf2da467ab88.zip hdf5-7332a1934e1394770c98ba129d92cf2da467ab88.tar.gz hdf5-7332a1934e1394770c98ba129d92cf2da467ab88.tar.bz2 |
[svn-r3193]
Purpose:
bug fix
Description:
Zeroing out all memory buffer before it is being used.
Solution:
using h4toh5ZeroMemory function
Platforms tested:
linux(eirene), arabica(sun 2.7)
Diffstat (limited to 'tools/h4toh5util.c')
-rw-r--r-- | tools/h4toh5util.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/h4toh5util.c b/tools/h4toh5util.c index ea9c452..64e32cf 100644 --- a/tools/h4toh5util.c +++ b/tools/h4toh5util.c @@ -526,13 +526,16 @@ int conv_int_str(uint16 num, char* str_num) { /* the maximum reference number is 65536. */ + if(str_num == NULL) { printf(" memory for str_num should be allocated.\n"); return FAIL; } - sprintf(str_num,"%d",num); + /* Adding this line will cause problems, investigating this later. +h4toh5_ZeroMemory(str_num,strlen(str_num)+1);*/ + sprintf(str_num,"%d",num); return SUCCEED; } |