handle src buffer underflow corner cases