summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2007-02-20 14:53:19 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2007-02-20 14:53:19 (GMT)
commit270f7ce123b3bc550ebda311d4f00bc45a19c757 (patch)
treec1fd52ff4a3c184333dadfcab3ce3f8a83470816 /src/H5Tconv.c
parentd1a1f2421d9653b13ecf491e642129fa7f9fab6b (diff)
downloadhdf5-270f7ce123b3bc550ebda311d4f00bc45a19c757.zip
hdf5-270f7ce123b3bc550ebda311d4f00bc45a19c757.tar.gz
hdf5-270f7ce123b3bc550ebda311d4f00bc45a19c757.tar.bz2
[svn-r13342] Bug fix (#717): Nested VL data failed to free the space when the data is over-
written with shorter length.
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index c7ff562..4c0cc40 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2901,10 +2901,10 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
if(nested && seq_len<(ssize_t)bg_seq_len) {
size_t parent_seq_len;
size_t u;
-
- uint8_t *tmp_p=tmp_buf;
- tmp_p += seq_len*dst_base_size;
- for(u=0; u<(bg_seq_len-seq_len); u++) {
+ uint8_t *tmp_p;
+ /* TMP_P is reset each time in the loop because DST_BASE_SIZE may include some data in addition to VL info. - SLU */
+ for(u=seq_len; u<bg_seq_len; u++) {
+ tmp_p = tmp_buf + u*dst_base_size;
UINT32DECODE(tmp_p, parent_seq_len);
if(parent_seq_len>0) {
H5F_addr_decode(dst->shared->u.vlen.f, (const uint8_t **)&tmp_p, &(parent_hobjid.addr));