]> Cypherpunks repositories - gostls13.git/commit
crypto/tls: fix first byte test for 255 CBC padding bytes
authorPeter Wu <pwu@cloudflare.com>
Wed, 4 Oct 2017 12:44:34 +0000 (13:44 +0100)
committerAdam Langley <agl@golang.org>
Fri, 6 Oct 2017 18:07:04 +0000 (18:07 +0000)
commitcb3b34520985a2d1a6797f00b9e4529271212bdd
tree5cbbb5de2abaad76e32ea9fd4ee5f91812e8a8b2
parent51cfe6849a2b945c9a2bb9d271bf142f3bb99eca
crypto/tls: fix first byte test for 255 CBC padding bytes

The BadCBCPadding255 test from bogo failed because at most 255 trailing
bytes were checked, but for a padding of 255 there are 255 padding bytes
plus 1 length byte with value 255.

Change-Id: I7dd237c013d2c7c8599067246e31b7ba93106cf7
Reviewed-on: https://go-review.googlesource.com/68070
Reviewed-by: Adam Langley <agl@golang.org>
Run-TryBot: Adam Langley <agl@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/crypto/tls/conn.go
src/crypto/tls/conn_test.go