mirror of
https://github.com/apple/swift-nio
synced 2026-11-29 05:24:21 +00:00
Motivation: All ByteBuffer API that is used to parse potentially untrusted data should be resilient against negative indices, offsets, and lenghts. Unfortunately, ByteBuffer.viewBytes(at:length:) was not. Modifications: Make ByteBuffer.viewBytes(at:length:) resilient against negative values. Result: Fewer crashes.