diff options
Diffstat (limited to 'test/trefstr.c')
-rw-r--r-- | test/trefstr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/trefstr.c b/test/trefstr.c index d0575ab..89e62db 100644 --- a/test/trefstr.c +++ b/test/trefstr.c @@ -309,7 +309,7 @@ test_refstr_asprintf_cat(void) /* Get pointer to raw string in ref-counted string */ s = H5RS_get_str(rs); CHECK_PTR(s, "H5RS_get_str"); - HDsprintf(buf, "%d-%s", (int)10, "foo"); + HDsnprintf(buf, sizeof(buf), "%d-%s", (int)10, "foo"); cmp = HDstrcmp(s, buf); VERIFY(cmp, 0, "HDstrcmp"); @@ -320,7 +320,7 @@ test_refstr_asprintf_cat(void) /* Get pointer to raw string in ref-counted string */ s = H5RS_get_str(rs); CHECK_PTR(s, "H5RS_get_str"); - HDsprintf(buf, "%d-%s-%f", (int)10, "foo", (double)20.0); + HDsnprintf(buf, sizeof(buf), "%d-%s-%f", (int)10, "foo", (double)20.0); cmp = HDstrcmp(s, buf); VERIFY(cmp, 0, "HDstrcmp"); @@ -360,7 +360,7 @@ test_refstr_acat(void) /* Get pointer to raw string in ref-counted string */ s = H5RS_get_str(rs); CHECK_PTR(s, "H5RS_get_str"); - HDsprintf(buf, "%s", "foo"); + HDsnprintf(buf, sizeof(buf), "%s", "foo"); cmp = HDstrcmp(s, buf); VERIFY(cmp, 0, "HDstrcmp"); @@ -371,7 +371,7 @@ test_refstr_acat(void) /* Get pointer to raw string in ref-counted string */ s = H5RS_get_str(rs); CHECK_PTR(s, "H5RS_get_str"); - HDsprintf(buf, "%s", "foobar"); + HDsnprintf(buf, sizeof(buf), "%s", "foobar"); cmp = HDstrcmp(s, buf); VERIFY(cmp, 0, "HDstrcmp"); @@ -386,7 +386,7 @@ test_refstr_acat(void) /* Get pointer to raw string in ref-counted string */ s = H5RS_get_str(rs); CHECK_PTR(s, "H5RS_get_str"); - HDsprintf(buf, "%s", "foobar"); + HDsnprintf(buf, sizeof(buf), "%s", "foobar"); large_str2 = HDmalloc(1024 + 6); CHECK_PTR(large_str2, "HDmalloc"); HDstrcpy(large_str2, "foobar"); |