Skip to content

Commit

Permalink
Fix use of possibly uninitialized memory in h5repack (HDFGroup#4354)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored and qkoziol committed Apr 9, 2024
1 parent 70023f0 commit a924711
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/src/h5repack/h5repack.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit a924711

Please sign in to comment.