Skip to content

Commit

Permalink
connection_request_accepted.go: Fixed potential crash as a result of …
Browse files Browse the repository at this point in the history
…an invalid length check.
  • Loading branch information
Sandertv committed May 2, 2024
1 parent 149f13b commit e8e7d67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/message/connection_request_accepted.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (pk *ConnectionRequestAccepted) UnmarshalBinary(data []byte) error {
break
}
}
if len(data) < 16 {
if len(data[offset:]) < 16 {
return io.ErrUnexpectedEOF
}
pk.RequestTimestamp = int64(binary.BigEndian.Uint64(data[offset:]))
Expand Down

0 comments on commit e8e7d67

Please sign in to comment.