diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2002-12-12 19:44:53 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2002-12-12 19:44:53 (GMT) |
commit | 0e1f75306a6ff50f7dafc235a94f2c0b5081b8c0 (patch) | |
tree | db24b291e938bb7d121a2bf6a6013871b20b3e2b /src/H5Tvlen.c | |
parent | 6a09c9086b97477b5c931db81a8a0041cff991af (diff) | |
download | hdf5-0e1f75306a6ff50f7dafc235a94f2c0b5081b8c0.zip hdf5-0e1f75306a6ff50f7dafc235a94f2c0b5081b8c0.tar.gz hdf5-0e1f75306a6ff50f7dafc235a94f2c0b5081b8c0.tar.bz2 |
[svn-r6199]
Purpose:
error-detection improvement
Description:
verify string parameter in function H5T_vlen_str_mem_getlen isn't nil.
Diffstat (limited to 'src/H5Tvlen.c')
-rw-r--r-- | src/H5Tvlen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5Tvlen.c b/src/H5Tvlen.c index 343f48b..b8a4a25 100644 --- a/src/H5Tvlen.c +++ b/src/H5Tvlen.c @@ -291,8 +291,9 @@ H5T_vlen_str_mem_getlen(H5F_t UNUSED *f, void *vl_addr) FUNC_ENTER_NOAPI(H5T_vlen_str_mem_getlen, FAIL); /* check parameters */ - assert(s); - + if (!s) + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "null pointer"); + /* Set return value */ ret_value=(hssize_t)HDstrlen(s); |