summaryrefslogtreecommitdiffstats
path: root/src/H5Pfcpl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Pfcpl.c')
-rw-r--r--src/H5Pfcpl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/H5Pfcpl.c b/src/H5Pfcpl.c
index 5383aae..6b0d2c0 100644
--- a/src/H5Pfcpl.c
+++ b/src/H5Pfcpl.c
@@ -1472,6 +1472,9 @@ H5Pset_file_space_page_size(hid_t plist_id, hsize_t fsp_size)
if(fsp_size < H5F_FILE_SPACE_PAGE_SIZE_MIN)
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to less than 512")
+ if(fsp_size > H5F_FILE_SPACE_PAGE_SIZE_MAX)
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "cannot set file space page size to more than 1GB")
+
/* Set the value*/
if(H5P_set(plist, H5F_CRT_FILE_SPACE_PAGE_SIZE_NAME, &fsp_size) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't set file space page size")