From: Steve Ellcey Date: Thu, 11 Dec 2014 16:14:17 +0000 (-0800) Subject: 2014-12-11 Steve Ellcey X-Git-Tag: glibc-2.21~251 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fc56e970934d9e936108240f3dc05e5e131f5772;p=thirdparty%2Fglibc.git 2014-12-11 Steve Ellcey * malloc/malloc.c: Fix powerof2 check. --- diff --git a/ChangeLog b/ChangeLog index b00214660cc..3bf18831d82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-12-11 Steve Ellcey + + * malloc/malloc.c: Fix powerof2 check. + 2014-12-11 Stefan Liebler * locale/programs/locfile.h (maybe_swap_uint32): diff --git a/malloc/malloc.c b/malloc/malloc.c index 6bfb8593ad7..cb91b97da46 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -4973,7 +4973,7 @@ __posix_memalign (void **memptr, size_t alignment, size_t size) /* Test whether the SIZE argument is valid. It must be a power of two multiple of sizeof (void *). */ if (alignment % sizeof (void *) != 0 - || !powerof2 (alignment / sizeof (void *)) != 0 + || !powerof2 (alignment / sizeof (void *)) || alignment == 0) return EINVAL;