remove unstandard error

All unmarshall calls return the same errShortPacket except this one for
no reason. Fix that.
This commit is contained in:
John Eikenberry 2019-08-25 18:21:33 -07:00
parent 79ae07e778
commit d4a0cecfdc
1 changed files with 1 additions and 1 deletions

View File

@ -802,7 +802,7 @@ func (p *sshFxpDataPacket) UnmarshalBinary(b []byte) error {
} else if p.Length, b, err = unmarshalUint32Safe(b); err != nil {
return err
} else if uint32(len(b)) < p.Length {
return errors.New("truncated packet")
return errShortPacket
}
p.Data = make([]byte, p.Length)