diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2003-12-31 20:28:46 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2003-12-31 20:28:46 (GMT) |
commit | b0b020d422b493228c00449391552bdfc50a33c2 (patch) | |
tree | 533cef47407452cdbe7142de8cbc1ac615132c4e /src/H5Zszip.c | |
parent | 0d405bdfb29f6af66b10d213804a55b6e2cd4998 (diff) | |
download | hdf5-b0b020d422b493228c00449391552bdfc50a33c2.zip hdf5-b0b020d422b493228c00449391552bdfc50a33c2.tar.gz hdf5-b0b020d422b493228c00449391552bdfc50a33c2.tar.bz2 |
[svn-r8007] Purpose:
Bug fix
Description:
Range check the szip 'pixels per block' against the chunk size of the
dataset when attempting to create a new dataset, since the szip library
requires the PPB to be at least the size of the fastest changing dimension
in the chunk.
Platforms tested:
FreeBSD 4.9 (sleipnir)
too minor for h5committest
Diffstat (limited to 'src/H5Zszip.c')
-rw-r--r-- | src/H5Zszip.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5Zszip.c b/src/H5Zszip.c index 94df634..9907f9c 100644 --- a/src/H5Zszip.c +++ b/src/H5Zszip.c @@ -129,6 +129,10 @@ H5Z_can_apply_szip(hid_t dcpl_id, hid_t type_id, hid_t space_id) assert(ndims>0); scanline=dims[ndims-1]; + /* Range check the pixels per block against the 'scanline' size */ + if(scanline<cd_values[H5Z_SZIP_PARM_PPB]) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "pixels per block greater than scanline"); + /* Range check the scanline's size */ if(scanline > SZ_MAX_PIXELS_PER_SCANLINE) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FALSE, "invalid scanline size") |