Fix read pipelining
authorMatt Caswell <matt@openssl.org>
Tue, 25 Oct 2022 14:47:36 +0000 (15:47 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 2 Nov 2022 10:11:40 +0000 (11:11 +0100)
commit8ccde3fc78b8db0acf8c11454b5dc4fb01485f4c
tree02863bf876a717d4fd5b3a0843eb2f98afdf5de9
parent3961af375e1522a3d37d2af8628bff43103ab4f5
Fix read pipelining

During read pipelining we must ensure that the buffer is sufficiently large
to read enough data to fill our pipelines. We also remove some code that
moved data to the start of the packet if we can. This was unnecessary
because of later code which would end up moving it anyway. The earlier move
was also incorrect in the case that |clearold| was 0. This would cause the
read pipelining code to fail with sufficiently large records.

Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19456)
ssl/record/methods/tls_common.c