diff options
Diffstat (limited to 'src/malloc')
-rw-r--r-- | src/malloc/posix_memalign.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/malloc/posix_memalign.c b/src/malloc/posix_memalign.c index ef86260d..2ae928c8 100644 --- a/src/malloc/posix_memalign.c +++ b/src/malloc/posix_memalign.c @@ -11,7 +11,7 @@ int posix_memalign(void **res, size_t align, size_t len) unsigned char *mem, *new, *end; size_t header, footer; - if ((align & -align) != align) return EINVAL; + if ((align & -align & -sizeof(void *)) != align) return EINVAL; if (len > SIZE_MAX - align) return ENOMEM; if (align <= 4*sizeof(size_t)) { |