From b79982a6062da9af83bfc3065c0c230aeebff875 Mon Sep 17 00:00:00 2001 From: mattjala <124107509+mattjala@users.noreply.github.com> Date: Mon, 26 Feb 2024 14:27:51 -0600 Subject: Fix allocating too much memory in dset API test (#4041) --- test/API/H5_api_dataset_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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++) { -- cgit v0.12