mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-25 17:00:45 +08:00
Fix uninitialized memory issues in packet table (#4271)
This commit is contained in:
parent
82442ed983
commit
8787e7f325
@ -2025,7 +2025,7 @@ H5TBinsert_field(hid_t loc_id, const char *dset_name, const char *field_name, hi
|
||||
goto out;
|
||||
|
||||
/* alloc fill value attribute buffer */
|
||||
if (NULL == (tmp_fill_buf = (unsigned char *)malloc(total_size)))
|
||||
if (NULL == (tmp_fill_buf = (unsigned char *)calloc(1, total_size)))
|
||||
goto out;
|
||||
|
||||
/* get the fill value attributes */
|
||||
|
@ -376,6 +376,8 @@ test_table(hid_t fid, int do_write)
|
||||
field_type[3] = H5T_NATIVE_DOUBLE;
|
||||
field_type[4] = H5T_NATIVE_INT;
|
||||
|
||||
memset(wbufd, 0, NRECORDS * sizeof(particle_t));
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Functions tested:
|
||||
|
Loading…
x
Reference in New Issue
Block a user