Skip to content

Commit

Permalink
Fixing ssh pty error
Browse files Browse the repository at this point in the history
sshd didn't use to check err when calling pty.New()
Added in an error and return in that case.

Signed-off-by: Gan Shun Lim <ganshun@gmail.com>
  • Loading branch information
GanShun authored and hugelgupf committed Apr 6, 2018
1 parent 8ed3bfa commit c76dd23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmds/sshd/sshd.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func newPTY(b []byte) (*pty.Pty, error) {
return nil, err
}
p, err := pty.New()
if err != nil {
return nil, err
}
ws, err := p.TTY.GetWinSize()
if err != nil {
return nil, err
Expand Down

0 comments on commit c76dd23

Please sign in to comment.