diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-03-03 00:09:58 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-03-03 00:09:58 +0000 |
commit | 057b2d974fd3321da3d1dc4b2ed9b1a5a6893048 (patch) | |
tree | b4c51aa233a9f76f42d1b01248fa0d553a7061f4 /libc/malloc_hooks/malloc_hooks.cpp | |
parent | 853b98678d5b8ddfdc335af7afc0e2345610ad55 (diff) | |
parent | c32e6747b75b177a26cdfcb0526d6e4cb822a432 (diff) |
Snap for 5348557 from c32e6747b75b177a26cdfcb0526d6e4cb822a432 to qt-release
Change-Id: I49f478eb230ff958e3779eedb36a31054df27ec2
Diffstat (limited to 'libc/malloc_hooks/malloc_hooks.cpp')
-rw-r--r-- | libc/malloc_hooks/malloc_hooks.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/malloc_hooks/malloc_hooks.cpp b/libc/malloc_hooks/malloc_hooks.cpp index f7bdd563a..715a6295b 100644 --- a/libc/malloc_hooks/malloc_hooks.cpp +++ b/libc/malloc_hooks/malloc_hooks.cpp @@ -176,7 +176,7 @@ int hooks_mallopt(int param, int value) { void* hooks_aligned_alloc(size_t alignment, size_t size) { if (__memalign_hook != nullptr && __memalign_hook != default_memalign_hook) { - if (!powerof2(alignment)) { + if (!powerof2(alignment) || (size % alignment) != 0) { errno = EINVAL; return nullptr; } |