First, the method must declare a contract. A contract says: if you do X, I will do Y. See http://en.wikipedia.org/wiki/Design_by_contract.
It must either (a) require non-overlapping buffers as a pre-condition or (b) allow overlapping buffers.
In case (a), the contract should be enforced for at least some part of the development/testing lifecycle. That is, you should add code to the function that tests for non-overlapping buffers and asserts (fails) if it's not satisfied. Since this code probably has performance constraints, you probably want to be able to switch the test on for development and testing and off for production, but that's a choice you make.
in case (b), you add code to permit overlapping buffers. That might be a different, possibly slower, algorithm or whatever technique you choose.
- What I describe is best practice. I have no way of knowing if it's
- You must consider overlapping buffers.
- You should assume nothing beyond your contract.
- The contract provides the documentation.