Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
fix buffer size check
Browse files Browse the repository at this point in the history
  • Loading branch information
vyzo committed Apr 28, 2019
1 parent 4d58713 commit 98b8bd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rw.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (r *etmReader) Read(buf []byte) (int, error) {

// If the destination buffer is too short, fill an internal buffer and then
// drain as much of that into the output buffer as will fit.
if cap(buf) < fullLen {
if len(buf) < fullLen {
err := r.fill()
if err != nil {
return 0, err
Expand Down

0 comments on commit 98b8bd9

Please sign in to comment.