Skip to content

Commit

Permalink
Fix panic on invalid handshake length
Browse files Browse the repository at this point in the history
  • Loading branch information
neilalexander committed Oct 12, 2023
1 parent 4b48fd0 commit 117e4b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ func (m *version_metadata) decode(r io.Reader, password []byte) bool {
return false
}

if len(bs) < ed25519.SignatureSize {
return false
}
sig := bs[len(bs)-ed25519.SignatureSize:]
bs = bs[:len(bs)-ed25519.SignatureSize]

Expand Down

0 comments on commit 117e4b8

Please sign in to comment.