summaryrefslogtreecommitdiffstats
path: root/src/H5Tvlen.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2003-02-04 18:50:56 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2003-02-04 18:50:56 (GMT)
commit3879dcce1b831fd553ff15256661ca7cc23ca70d (patch)
treef4a6ed3b08b7ac2926b396f497fdd62faf35bb6c /src/H5Tvlen.c
parent092a41fe51ea58ab388d5f5d577f7d4a16a1f5b8 (diff)
downloadhdf5-3879dcce1b831fd553ff15256661ca7cc23ca70d.zip
hdf5-3879dcce1b831fd553ff15256661ca7cc23ca70d.tar.gz
hdf5-3879dcce1b831fd553ff15256661ca7cc23ca70d.tar.bz2
[svn-r6375]
Purpose: New feature Description: Added Adler32 checksum as a filter in pipeline Platforms tested: arabica (fortran), eirene (, C++), modi4 (parallel, fortran) Misc. update: Update release_docs/RELEASE.
Diffstat (limited to 'src/H5Tvlen.c')
-rw-r--r--src/H5Tvlen.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c
index 42e249a..fa65056 100644
--- a/src/H5Tvlen.c
+++ b/src/H5Tvlen.c
@@ -291,7 +291,10 @@ H5T_vlen_str_mem_getlen(H5F_t UNUSED *f, void *vl_addr)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "null pointer");
/* Set return value */
- ret_value=(hssize_t)HDstrlen(s);
+ if(s)
+ ret_value=(hssize_t)HDstrlen(s);
+ else
+ ret_value = 0;
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -324,7 +327,10 @@ H5T_vlen_str_mem_read(H5F_t UNUSED *f, void *vl_addr, void *buf, size_t len)
assert(s);
assert(buf);
- HDmemcpy(buf,s,len);
+ if(s && buf && len>0)
+ HDmemcpy(buf,s,len);
+ if(!s && len==-1)
+ buf = NULL;
done:
FUNC_LEAVE_NOAPI(ret_value);