You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82 lines
2.5 KiB
82 lines
2.5 KiB
19 years ago
|
--- hdf5-1.6.5/tools/lib/h5diff_attr.c.orig 2005-12-21 12:08:45.000000000 -0700
|
||
|
+++ hdf5-1.6.5/tools/lib/h5diff_attr.c 2005-12-21 12:11:17.000000000 -0700
|
||
20 years ago
|
@@ -61,8 +61,8 @@
|
||
|
int rank2; /* rank of dataset */
|
||
|
hsize_t dims1[H5S_MAX_RANK];/* dimensions of dataset */
|
||
|
hsize_t dims2[H5S_MAX_RANK];/* dimensions of dataset */
|
||
19 years ago
|
- char name1[255];
|
||
20 years ago
|
- char name2[255];
|
||
19 years ago
|
+ char name1[255],np1[512];
|
||
20 years ago
|
+ char name2[255],np2[512];
|
||
19 years ago
|
int n1, n2, i, j;
|
||
20 years ago
|
int ret=0;
|
||
|
hsize_t nfound;
|
||
19 years ago
|
@@ -196,21 +196,21 @@
|
||
20 years ago
|
* array compare
|
||
|
*-------------------------------------------------------------------------
|
||
|
*/
|
||
|
- sprintf(name1,"%s of <%s>",name1,path1);
|
||
|
- sprintf(name2,"%s of <%s>",name2,path2);
|
||
|
+ snprintf(np1,sizeof(np1),"%s of <%s>",name1,path1);
|
||
|
+ snprintf(np2,sizeof(np2),"%s of <%s>",name2,path2);
|
||
|
|
||
|
/* always print name */
|
||
|
if (options->m_verbose)
|
||
|
{
|
||
19 years ago
|
- printf( "Attribute: <%s> and <%s>\n",name1,name2);
|
||
|
+ printf( "Attribute: <%s> and <%s>\n",np1,np2);
|
||
|
nfound = diff_array(buf1,
|
||
20 years ago
|
buf2,
|
||
|
nelmts1,
|
||
|
rank1,
|
||
|
dims1,
|
||
|
options,
|
||
|
- name1,
|
||
|
- name2,
|
||
|
+ np1,
|
||
|
+ np2,
|
||
|
mtype1_id,
|
||
|
attr1_id,
|
||
|
attr2_id);
|
||
19 years ago
|
@@ -230,8 +230,8 @@
|
||
20 years ago
|
rank1,
|
||
|
dims1,
|
||
|
options,
|
||
|
- name1,
|
||
|
- name2,
|
||
|
+ np1,
|
||
|
+ np2,
|
||
|
mtype1_id,
|
||
|
attr1_id,
|
||
|
attr2_id);
|
||
19 years ago
|
@@ -239,15 +239,15 @@
|
||
20 years ago
|
options->m_quiet=0;
|
||
19 years ago
|
if (nfound)
|
||
20 years ago
|
{
|
||
19 years ago
|
- printf( "Attribute: <%s> and <%s>\n",name1,name2);
|
||
|
+ printf( "Attribute: <%s> and <%s>\n",np1,np2);
|
||
|
nfound = diff_array(buf1,
|
||
20 years ago
|
buf2,
|
||
|
nelmts1,
|
||
|
rank1,
|
||
|
dims1,
|
||
|
options,
|
||
|
- name1,
|
||
|
- name2,
|
||
|
+ np1,
|
||
|
+ np2,
|
||
|
mtype1_id,
|
||
|
attr1_id,
|
||
|
attr2_id);
|
||
19 years ago
|
@@ -263,8 +263,8 @@
|
||
20 years ago
|
rank1,
|
||
|
dims1,
|
||
|
options,
|
||
|
- name1,
|
||
|
- name2,
|
||
|
+ np1,
|
||
|
+ np2,
|
||
|
mtype1_id,
|
||
|
attr1_id,
|
||
|
attr2_id);
|