Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Decode tree bug: incomplete reads break the decoding process #64

Merged
merged 2 commits into from
Aug 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ func (t *Tree) Decode(o core.Object) (err error) {
}

var hash core.Hash
_, err = r.Read(hash[:])
if err != nil && err != io.EOF {
if _, err = io.ReadFull(r, hash[:]); err != nil {
return err
}

Expand Down
Loading