summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authormattjala <124107509+mattjala@users.noreply.github.com>2024-02-26 20:27:51 (GMT)
committerGitHub <noreply@github.com>2024-02-26 20:27:51 (GMT)
commitb79982a6062da9af83bfc3065c0c230aeebff875 (patch)
treeac75ac8f531721738fc2c3217146fa635ea167cf /test
parent221e4295788d3e5d2a8afe147c8127e8cf40732f (diff)
downloadhdf5-b79982a6062da9af83bfc3065c0c230aeebff875.zip
hdf5-b79982a6062da9af83bfc3065c0c230aeebff875.tar.gz
hdf5-b79982a6062da9af83bfc3065c0c230aeebff875.tar.bz2
Fix allocating too much memory in dset API test (#4041)
Diffstat (limited to 'test')
-rw-r--r--test/API/H5_api_dataset_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/API/H5_api_dataset_test.c b/test/API/H5_api_dataset_test.c
index 257191f..2989b70 100644
--- a/test/API/H5_api_dataset_test.c
+++ b/test/API/H5_api_dataset_test.c
@@ -10047,7 +10047,7 @@ test_dataset_vlen_io(void)
TESTING_2("write and read entire dataspace with string sequence");
/* Set up write buffer */
for (size_t i = 0; i < DATASET_VLEN_IO_DSET_DIMS; i++) {
- if ((wbuf[i].p = calloc(i + 1, DATASET_VLEN_IO_STR_LEN * (i + 1))) == NULL)
+ if ((wbuf[i].p = calloc(i + 1, DATASET_VLEN_IO_STR_LEN)) == NULL)
PART_TEST_ERROR(rw_all_string);
for (size_t j = 0; j < i + 1; j++) {