summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2002-12-13 21:17:46 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2002-12-13 21:17:46 (GMT)
commit69195e41a990dc95003917887e1b70965fa9db37 (patch)
treee6ab30e42070a62be39d0944f94eea416c52771b
parent6aa87a74e1c4f48515ad42e8340b245fb44696a7 (diff)
downloadhdf5-69195e41a990dc95003917887e1b70965fa9db37.zip
hdf5-69195e41a990dc95003917887e1b70965fa9db37.tar.gz
hdf5-69195e41a990dc95003917887e1b70965fa9db37.tar.bz2
[svn-r6206]
Purpose: Improve error handling Description: make error handling better for VL string null pointer. Platform tested: arabica
-rw-r--r--src/H5Tconv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 43d9dd2..0444d2c 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2238,8 +2238,8 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts,
d = *dptr;
/* Get length of element sequences */
- seq_len=(*(src->u.vlen.getlen))(src->u.vlen.f,s);
- assert(seq_len>=0);
+ if((seq_len=(*(src->u.vlen.getlen))(src->u.vlen.f,s))<0)
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "null pointer");
H5_CHECK_OVERFLOW(seq_len,hssize_t,size_t);
src_size=(size_t)seq_len*src_base_size;
dst_size=(size_t)seq_len*dst_base_size;