Fix use of possibly uninitialized memory in h5repack (#4354) (#4356)

This commit is contained in:
jhendersonHDF 2024-04-08 22:17:40 -05:00 committed by GitHub
parent 11f768ea02
commit 8eb3311d0b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -481,7 +481,7 @@ copy_attr(hid_t loc_in, hid_t loc_out, named_dt_t **named_dt_head_p, trav_table_
*-----------------------------------------------------------------
*/
buf = (void *)malloc((size_t)(nelmts * msize));
buf = (void *)calloc(1, (size_t)(nelmts * msize));
if (buf == NULL) {
H5TOOLS_GOTO_ERROR((-1), "malloc failed");
} /* end if */