From 4a6754faab5fd8b7bb2dc8a285cfa401585334c7 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: [PATCH] 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 138a3836e02..4110dd714de 100644 --- a/test/API/H5_api_dataset_test.c +++ b/test/API/H5_api_dataset_test.c @@ -9943,7 +9943,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++) {