Skip to content

Commit

Permalink
fix: sanity check status request v2 extension data (#246) (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
VeNoMouS committed Sep 28, 2023
1 parent d2b5b70 commit df6e4c8
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions u_tls_extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,7 @@ func (e *StatusRequestV2Extension) Write(b []byte) (int, error) {
// RFC 4366, Section 3.6
var statusType uint8
var ignored cryptobyte.String
if !extData.ReadUint16LengthPrefixed(&ignored) ||
!extData.ReadUint8(&statusType) ||
!extData.ReadUint16LengthPrefixed(&ignored) ||
!extData.ReadUint16LengthPrefixed(&ignored) ||
!extData.ReadUint16LengthPrefixed(&ignored) {
if !extData.ReadUint16LengthPrefixed(&ignored) || !ignored.ReadUint8(&statusType) {
return fullLen, errors.New("unable to read status request v2 extension data")
}

Expand Down

0 comments on commit df6e4c8

Please sign in to comment.