diff options
author | Sean McBride <sean@rogue-research.com> | 2024-02-13 14:22:17 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 14:22:17 (GMT) |
commit | f309fcebbd777f4d2664775ac6582f3c0bcd1396 (patch) | |
tree | 1b853ab43bd83d56205f7b9cb9f26538724fcd2c /test/API/H5_api_attribute_test.c | |
parent | beee0a327d75f826407aecae04581c930d06aad5 (diff) | |
download | hdf5-f309fcebbd777f4d2664775ac6582f3c0bcd1396.zip hdf5-f309fcebbd777f4d2664775ac6582f3c0bcd1396.tar.gz hdf5-f309fcebbd777f4d2664775ac6582f3c0bcd1396.tar.bz2 |
Issue #1824: Replaced most remaining sprintf with safer snprint (#4003)
Diffstat (limited to 'test/API/H5_api_attribute_test.c')
-rw-r--r-- | test/API/H5_api_attribute_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/API/H5_api_attribute_test.c b/test/API/H5_api_attribute_test.c index db8e6ad..02eddd0 100644 --- a/test/API/H5_api_attribute_test.c +++ b/test/API/H5_api_attribute_test.c @@ -10725,7 +10725,7 @@ test_attribute_many(void) /* Create many attributes */ for (u = 0; u < ATTRIBUTE_MANY_NUMB; u++) { - sprintf(attrname, "many-%06u", u); + snprintf(attrname, sizeof(attrname), "many-%06u", u); if ((attr_id = H5Acreate2(group_id, attrname, attr_dtype, space_id, H5P_DEFAULT, H5P_DEFAULT)) < 0) { H5_FAILED(); |