Skip to content

Commit

Permalink
Fix allocating too much memory in dset API test (HDFGroup#4041)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala authored and jhendersonHDF committed Dec 9, 2024
1 parent aa6d4f4 commit 4a6754f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/API/H5_api_dataset_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down

0 comments on commit 4a6754f

Please sign in to comment.