summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-09-28 04:34:38 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-09-28 04:34:38 (GMT)
commita841ea35292de8097b429f98af48b29f21c97893 (patch)
tree8a400ec6e9c6b06e641a75f5cac82cee01fea751
parent97dbe75dc17f28e7649d3e31f30019cdc156bafc (diff)
downloadhdf5-a841ea35292de8097b429f98af48b29f21c97893.zip
hdf5-a841ea35292de8097b429f98af48b29f21c97893.tar.gz
hdf5-a841ea35292de8097b429f98af48b29f21c97893.tar.bz2
[svn-r9327] Purpose:
Bug fix. Description: Fix off-by-one error in Core VFL driver which would cause spurious address or size overflow errors when an odd valued address or size was checked. Platforms tested: FreeBSD 4.10 (sleipnir) Linux 2.4 (heping) Solaris 2.7 (arabica)
-rw-r--r--release_docs/RELEASE.txt2
-rw-r--r--src/H5FDcore.c8
-rw-r--r--src/H5FDsec2.c5
3 files changed, 3 insertions, 12 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index f8252c9..9f6ed06 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -180,6 +180,8 @@ Bug Fixes since HDF5-1.6.0 release
Library
-------
+ - Fixed address check in Core VFL driver to avoid spurious address/size
+ overflows for odd valued addresses and/or sizes. QAK - 2004/09/27
- Fixed parallel bug in which some processes attempted collective
I/O while others did independent I/O. Bug appeared when some
processes used point selections, and others didn't. JRM - 2004/9/15
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 42eda85..4b26335 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -37,12 +37,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
-#undef MAX
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
-
-#undef MIN
-#define MIN(X,Y) ((X)<(Y)?(X):(Y))
-
/* The driver identification number, initialized at runtime */
static hid_t H5FD_CORE_g = 0;
@@ -85,7 +79,7 @@ typedef struct H5FD_core_fapl_t {
* REGION_OVERFLOW: Checks whether an address and size pair describe data
* which can be addressed entirely in memory.
*/
-#define MAXADDR ((haddr_t)((~(size_t)0)-1))
+#define MAXADDR ((haddr_t)(~(size_t)0))
#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \
((A) & ~(haddr_t)MAXADDR))
#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR)
diff --git a/src/H5FDsec2.c b/src/H5FDsec2.c
index f8cf0e5..492e024 100644
--- a/src/H5FDsec2.c
+++ b/src/H5FDsec2.c
@@ -41,11 +41,6 @@
#include "H5MMprivate.h" /* Memory management */
#include "H5Pprivate.h" /* Property lists */
-#ifdef MAX
-#undef MAX
-#define MAX(X,Y) ((X)>(Y)?(X):(Y))
-#endif /* MAX */
-
/* The driver identification number, initialized at runtime */
static hid_t H5FD_SEC2_g = 0;