Lines 310-316
Link Here
|
310 |
if(version == H5O_DTYPE_VERSION_1) { |
310 |
if(version == H5O_DTYPE_VERSION_1) { |
311 |
/* Decode the number of dimensions */ |
311 |
/* Decode the number of dimensions */ |
312 |
ndims = *(*pp)++; |
312 |
ndims = *(*pp)++; |
313 |
HDassert(ndims <= 4); |
313 |
|
|
|
314 |
/* Check that ndims is valid */ |
315 |
if(ndims > 4) |
316 |
HGOTO_ERROR(H5E_DATATYPE, H5E_BADTYPE, FAIL, "invalid number of dimensions for array") |
317 |
|
314 |
*pp += 3; /*reserved bytes */ |
318 |
*pp += 3; /*reserved bytes */ |
315 |
|
319 |
|
316 |
/* Skip dimension permutation */ |
320 |
/* Skip dimension permutation */ |
Lines 518-524
Link Here
|
518 |
dt->shared->u.array.ndims = *(*pp)++; |
522 |
dt->shared->u.array.ndims = *(*pp)++; |
519 |
|
523 |
|
520 |
/* Double-check the number of dimensions */ |
524 |
/* Double-check the number of dimensions */ |
521 |
HDassert(dt->shared->u.array.ndims <= H5S_MAX_RANK); |
525 |
if(dt->shared->u.array.ndims > H5S_MAX_RANK) |
|
|
526 |
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "too many dimensions for array datatype") |
522 |
|
527 |
|
523 |
/* Skip reserved bytes, if version has them */ |
528 |
/* Skip reserved bytes, if version has them */ |
524 |
if(version < H5O_DTYPE_VERSION_3) |
529 |
if(version < H5O_DTYPE_VERSION_3) |