diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Tvlen.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index 739c13c..d78f4d3 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -551,12 +551,13 @@ H5T_vlen_str_mem_read(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, void *_vl, void *bu FUNC_ENTER_NOAPI_NOINIT_NOFUNC(H5T_vlen_str_mem_read) - /* check parameters */ - assert(s); - assert(buf); + if(len>0) { + /* check parameters */ + assert(s); + assert(buf); - if(len>0) HDmemcpy(buf,s,len); + } /* end if */ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5T_vlen_str_mem_read() */ @@ -796,7 +797,7 @@ H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, void *_vl, void *buf, void *_bg, hs /* check parameters */ assert(vl); - assert(buf); + assert(seq_len==0 || buf); assert(f); /* Free heap object for old data. */ |