diff --git a/internal/inproc/conn.go b/internal/inproc/conn.go index 6930450..fdced62 100644 --- a/internal/inproc/conn.go +++ b/internal/inproc/conn.go @@ -78,6 +78,9 @@ func (c *conn) read(data []byte) (int, error) { select { case bw := <-c.r: nr := copy(data, bw) + if len(data) < len(bw) { + return nr, io.ErrShortBuffer + } return nr, nil case <-c.rdeadline.wait(): return 0, timeoutError{}