summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2002-12-12 19:44:53 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2002-12-12 19:44:53 (GMT)
commit0e1f75306a6ff50f7dafc235a94f2c0b5081b8c0 (patch)
treedb24b291e938bb7d121a2bf6a6013871b20b3e2b /src
parent6a09c9086b97477b5c931db81a8a0041cff991af (diff)
downloadhdf5-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')
-rw-r--r--src/H5Tvlen.c5
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);