summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_parse.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-01-08 15:53:32 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-01-08 15:53:32 (GMT)
commitbe7ebb248fbe7d887b44b4aecbfe80f2517d53b1 (patch)
treedf693260fe94f6a8d47968d4cbac66a9476ba841 /tools/h5repack/h5repack_parse.c
parentfeaa5bb9d54017961e325f4bc2c366fc023c2443 (diff)
downloadhdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.zip
hdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.tar.gz
hdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.tar.bz2
[svn-r8040] Purpose:
bug fix, code improvment Description: fixed a bug in the parse of chunking function added some auxiliary functions to avoid repeated parts of the code in several places Solution: Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_parse.c')
-rw-r--r--tools/h5repack/h5repack_parse.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/h5repack/h5repack_parse.c b/tools/h5repack/h5repack_parse.c
index 0364206..0f1e0d2 100644
--- a/tools/h5repack/h5repack_parse.c
+++ b/tools/h5repack/h5repack_parse.c
@@ -399,6 +399,14 @@ obj_list_t* parse_layout(const char *str,
*-------------------------------------------------------------------------
*/
k=0;
+
+ if (j>(int)len)
+ {
+ if (obj_list) free(obj_list);
+ printf("Parse layout error: <%s> Chunk dimensions missing\n",str);
+ exit(1);
+ }
+
for ( i=j, c_index=0; i<len; i++)
{
c = str[i];