Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Alloc at least 1 elem in pool_t block_ptrs. (flame#560)
Details: - Previously, the block_ptrs field of the pool_t was allowed to be initialized as any unsigned integer, including 0. However, a length of 0 could be problematic given that malloc(0) is undefined and therefore variable across implementations. As a safety measure, we check for block_ptrs array lengths of 0 and, in that case, increase them to 1. - Co-authored-by: Minh Quan Ho <[email protected]> Change-Id: I1e885d887aaba5e73df091ef52e6c327fd6418de
- Loading branch information