From df6e4c827aa5895583d53e9ccc5139077af27786 Mon Sep 17 00:00:00 2001 From: VeNoMouS Date: Thu, 28 Sep 2023 19:08:26 +1300 Subject: [PATCH] fix: sanity check status request v2 extension data (#246) (#247) --- u_tls_extensions.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/u_tls_extensions.go b/u_tls_extensions.go index 45c1b1b6..cf830607 100644 --- a/u_tls_extensions.go +++ b/u_tls_extensions.go @@ -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") }