summaryrefslogtreecommitdiff
path: root/ptr_chck.c
diff options
context:
space:
mode:
Diffstat (limited to 'ptr_chck.c')
-rw-r--r--ptr_chck.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ptr_chck.c b/ptr_chck.c
index d8076e84..5b3cc0a6 100644
--- a/ptr_chck.c
+++ b/ptr_chck.c
@@ -226,7 +226,7 @@ GC_API void * GC_CALL GC_is_visible(void *p)
if ((word)((ptr_t)p - (ptr_t)base) > (word)descr) goto fail;
break;
case GC_DS_BITMAP:
- if ((ptr_t)p - (ptr_t)base
+ if ((word)((ptr_t)p - (ptr_t)base)
>= WORDS_TO_BYTES(BITMAP_BITS)
|| ((word)p & (sizeof(word) - 1))) goto fail;
if (!(((word)1 << (WORDSZ - ((ptr_t)p - (ptr_t)base) - 1))