summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 7b5fce1..0c98633 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -1668,7 +1668,7 @@ H5T__conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t olap; /*num overlapping elements */
size_t half_size; /*1/2 of total size for swapping*/
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t dbuf[256]; /*temp destination buffer */
+ uint8_t dbuf[256] = {0}; /*temp destination buffer */
size_t msb_pad_offset; /*offset for dest MSB padding */
size_t i;
uint8_t * src_rev = NULL; /*order-reversed source buffer */
@@ -3843,8 +3843,8 @@ H5T__conv_i_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t half_size; /*half the type size */
size_t olap; /*num overlapping elements */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
size_t first;
ssize_t sfirst; /*a signed version of `first' */
size_t i; /*Local index variables */
@@ -4286,8 +4286,8 @@ H5T__conv_f_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t olap; /*num overlapping elements */
ssize_t bitno = 0; /*bit number */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
@@ -4947,7 +4947,7 @@ H5T__conv_s_s(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
dst_delta = (ssize_t)direction * (ssize_t)(buf_stride ? buf_stride : dst->shared->size);
/* Allocate the overlap buffer */
- if (NULL == (dbuf = (uint8_t *)H5MM_malloc(dst->shared->size)))
+ if (NULL == (dbuf = (uint8_t *)H5MM_calloc(dst->shared->size)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for string conversion")
/* The conversion loop. */
@@ -8401,8 +8401,8 @@ H5T__conv_f_i(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t tsize; /*type size for swapping bytes */
size_t olap; /*num overlapping elements */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */
@@ -9027,8 +9027,8 @@ H5T__conv_i_f(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, siz
size_t tsize; /*type size for swapping bytes */
size_t olap; /*num overlapping elements */
uint8_t * s, *sp, *d, *dp; /*source and dest traversal ptrs*/
- uint8_t * src_rev = NULL; /*order-reversed source buffer */
- uint8_t dbuf[64]; /*temp destination buffer */
+ uint8_t * src_rev = NULL; /*order-reversed source buffer */
+ uint8_t dbuf[64] = {0}; /*temp destination buffer */
uint8_t tmp1, tmp2; /*temp variables for swapping bytes*/
/* Conversion-related variables */