diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-09-28 19:07:01 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-09-28 19:07:01 (GMT) |
commit | 85597e5cc7822712fb60baf30f3109d3a14f3c51 (patch) | |
tree | dec571675a4c6c4b5492087b03c91ef542daf9a9 | |
parent | 5c0011a71384223791d18028968382db43f08a6f (diff) | |
download | hdf5-85597e5cc7822712fb60baf30f3109d3a14f3c51.zip hdf5-85597e5cc7822712fb60baf30f3109d3a14f3c51.tar.gz hdf5-85597e5cc7822712fb60baf30f3109d3a14f3c51.tar.bz2 |
[svn-r9330] Purpose:
Bug fix
Description:
Another attempt to fix the address overflow in the core VFL, hopefully one
that works on 64-bit platforms.
Platforms tested:
AIX 5.1 (copper)
-rw-r--r-- | src/H5FDcore.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 4b26335..1b3d877 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -79,10 +79,9 @@ 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)) -#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || \ - ((A) & ~(haddr_t)MAXADDR)) -#define SIZE_OVERFLOW(Z) ((Z) & ~(hsize_t)MAXADDR) +#define MAXADDR ((haddr_t)((~(size_t)0)-1)) +#define ADDR_OVERFLOW(A) (HADDR_UNDEF==(A) || (A) > (haddr_t)MAXADDR) +#define SIZE_OVERFLOW(Z) ((Z) > (hsize_t)MAXADDR) #define REGION_OVERFLOW(A,Z) (ADDR_OVERFLOW(A) || SIZE_OVERFLOW(Z) || \ HADDR_UNDEF==(A)+(Z) || \ (size_t)((A)+(Z))<(size_t)(A)) |