diff --git a/conn.go b/conn.go index d54d760..27dc1c4 100644 --- a/conn.go +++ b/conn.go @@ -736,7 +736,7 @@ Again: } b.off = off data := b.data[b.off:] - if len(data) > maxPlaintext { + if (c.vers < VersionTLS13 && len(data) > maxPlaintext) || len(data) > maxPlaintext+1 { c.in.freeBlock(b) return c.in.setErrorLocked(c.sendAlert(alertRecordOverflow)) }