mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
Motivation: We'd go into an infinite loop when trying to increase the capacity of a 0 capacity ByteBuffer *doh*. Thanks @vlm for reporting and writing the test. Modifications: made sure ensureAvailableCapacity returns at least 1 if we don't have enough capacity available. Result: 0 capacity ByteBuffers resize now.