From 1a34082c36a5fdeb9ee45f096b034ef9ed1b9ccd Mon Sep 17 00:00:00 2001 From: asfernandes Date: Tue, 4 Aug 2009 15:32:07 +0000 Subject: [PATCH] Comment and fix for 64 bit --- src/jrd/BlrReader.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/jrd/BlrReader.h b/src/jrd/BlrReader.h index 44f128db6a..9477c809fd 100644 --- a/src/jrd/BlrReader.h +++ b/src/jrd/BlrReader.h @@ -36,8 +36,11 @@ public: end(buffer + maxLen), pos(buffer) { + // ASF: A big maxLen like MAX_ULONG could overflow the pointer size and + // points to something before start. In this case, we set the end to the + // max possible address. if (end < start) - end = (UCHAR*) -1; + end = ((UCHAR*) 0) - 1; } BlrReader()