From 69195e41a990dc95003917887e1b70965fa9db37 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Fri, 13 Dec 2002 16:17:46 -0500 Subject: [svn-r6206] Purpose: Improve error handling Description: make error handling better for VL string null pointer. Platform tested: arabica --- src/H5Tconv.c | 4 ++-- 1 file 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; -- cgit v0.12