Don't reset the packet pointer in ssl3_setup_read_buffer
authorMatt Caswell <matt@openssl.org>
Tue, 13 Jul 2021 16:19:12 +0000 (17:19 +0100)
committerMatt Caswell <matt@openssl.org>
Fri, 16 Jul 2021 10:31:36 +0000 (11:31 +0100)
commit97664088f3b332cfd462e3d209983115ef88cfc9
tree963a9a80d50aa78e60428c6db316e6c27aee210b
parent657f3d030fce41600d3b9f8daf4cb98c8dc4ec3e
Don't reset the packet pointer in ssl3_setup_read_buffer

Sometimes this function gets called when the buffers have already been
set up. If there is already a partial packet in the read buffer then the
packet pointer will be set to an incorrect value. The packet pointer already
gets reset to the correct value when we first read a packet anyway, so we
don't also need to do it in ssl3_setup_read_buffer.

Fixes #13729

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16098)
ssl/record/ssl3_buffer.c