robbiehanson/CocoaAsyncSocket — pull request #205 by epatey (2014-01-03 20:04:15+00:00)
Title: Failing unit test and fix for buffer overrun access violation in GCDAsyncSocketPreBuffer.

It's easy to see the bug by putting the read pointer slightly behind the write pointer both near the end of the buffer. I would imagine this is a remnant of the pre buffer being a ring buffer.