diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2014-08-11 14:39:49 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2014-08-11 14:39:49 (GMT) |
commit | 89ff12bfb2f01b8eda0f47fae31c6ca33c09ce22 (patch) | |
tree | f3c7e36ff4199f81862320856712b845c523e3a7 | |
parent | c1735ecdb78e0bc636cb1a4ebed8af94e96e0ef7 (diff) | |
download | hdf5-89ff12bfb2f01b8eda0f47fae31c6ca33c09ce22.zip hdf5-89ff12bfb2f01b8eda0f47fae31c6ca33c09ce22.tar.gz hdf5-89ff12bfb2f01b8eda0f47fae31c6ca33c09ce22.tar.bz2 |
[svn-r25529] Purpose:
Merged r25508 from the trunk.
Adds a check that ensure the page_size parameter in
H5Pset_core_write_tracking is not zero. This ensures that the behavior
matches the text in the reference manual.
Tested on:
32-bit LE linux (jam), tested with make check-vfd.
This is a very minor change and does not require full testing.
-rw-r--r-- | release_docs/RELEASE.txt | 7 | ||||
-rw-r--r-- | src/H5Pfapl.c | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index e9ca754..fa733cd 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -125,6 +125,13 @@ Bug Fixes since HDF5-1.8.13 thread-safe library is built on Windows. (DER - 2014/06/13 HDFFV-8837) + - Enforce constraing on page_size parameter in + H5Pset_core_write_tracking(). + The reference manual states that the page_size parameter cannot be zero. + This change checks the page_size parameter to ensure it is zero and returns + an error code if it is. + (DER - 2014/08/11 HDFFV-8891) + Parallel Library ---------------- - None diff --git a/src/H5Pfapl.c b/src/H5Pfapl.c index 257eb24..d743441 100644 --- a/src/H5Pfapl.c +++ b/src/H5Pfapl.c @@ -2386,6 +2386,10 @@ H5Pset_core_write_tracking(hid_t plist_id, hbool_t is_enabled, size_t page_size) FUNC_ENTER_API(FAIL) H5TRACE3("e", "ibz", plist_id, is_enabled, page_size); + /* The page size cannot be zero */ + if(page_size == 0) + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "page_size cannot be zero") + /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_FILE_ACCESS))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") |