Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(buffer): check capacity before resizing
``cmp::min(cap * 4, MAX_BUFFER_SIZE) - cap'' can underflow when cap > MAX_BUFFER_SIZE. cap can exceed MAX_BUFFER_SIZE because Vec::reserve aligns to powers of two. Discovered by Matt Howard <[email protected]>
- Loading branch information