diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-10 14:56:03 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-10-10 14:56:03 (GMT) |
commit | 421dfab94c830224e04955e7fabe9d65a6e6e35a (patch) | |
tree | 8fe5f8ea837c48da8bd1bdae5592bcfe5b9da5a4 /src/H5Tconv.c | |
parent | 26757351f5622e7c17e155da74169ed544a63c3d (diff) | |
download | hdf5-421dfab94c830224e04955e7fabe9d65a6e6e35a.zip hdf5-421dfab94c830224e04955e7fabe9d65a6e6e35a.tar.gz hdf5-421dfab94c830224e04955e7fabe9d65a6e6e35a.tar.bz2 |
[svn-r7592] Purpose:
Bug fix
Description:
Correct the size of the buffer needed for the destination value to use
the actual destination type size.
Platforms tested:
FreeBSD 4.9 (sleipnir)
too minor to require h5committest
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 0580c2d..e34fac6 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -2127,7 +2127,6 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, void *tmp_buf=NULL; /*temporary background buffer */ size_t tmp_buf_size=0; /*size of temporary bkg buffer */ void *dbuf=NULL; /*temp destination buffer */ - size_t dbuf_size=0; /*size of destination buffer */ int direction; /*direction of traversal */ int nested=0; /*flag of nested VL case */ hsize_t elmtno; /*element number counter */ @@ -2207,8 +2206,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, bkg_delta = direction * (bkg_stride ? bkg_stride : dst->size); /* Dynamically allocate the destination buffer */ - dbuf_size=MAX(sizeof(hvl_t),sizeof(char *)); - if ((dbuf=H5FL_BLK_MALLOC(vlen_seq,dbuf_size))==NULL) + if ((dbuf=H5FL_BLK_MALLOC(vlen_seq,dst->size))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); /* |