From 85597e5cc7822712fb60baf30f3109d3a14f3c51 Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Tue, 28 Sep 2004 14:07:01 -0500 Subject: [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) --- src/H5FDcore.c | 7 +++---- 1 file 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)) -- cgit v0.12