mirror of
https://github.com/GrapheneOS/hardened_malloc.git
synced 2025-04-20 06:20:20 +02:00
harden thread_arena check
This commit is contained in:
parent
d5c00b4d0d
commit
62c73d8b41
1 changed files with 1 additions and 1 deletions
|
@ -469,7 +469,7 @@ static inline void *allocate_small(size_t requested_size) {
|
||||||
size_t size = info.size ? info.size : 16;
|
size_t size = info.size ? info.size : 16;
|
||||||
|
|
||||||
#if N_ARENA > 1
|
#if N_ARENA > 1
|
||||||
if (unlikely(thread_arena == N_ARENA)) {
|
if (unlikely(thread_arena >= N_ARENA)) {
|
||||||
thread_arena = thread_arena_counter++ % N_ARENA;
|
thread_arena = thread_arena_counter++ % N_ARENA;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue