[openssl/openssl] 3d004c: Use the same encryption growth macro consistently
Matt Caswell
noreply at github.com
Mon Nov 14 11:36:06 UTC 2022
Branch: refs/heads/openssl-3.1
Home: https://github.com/openssl/openssl
Commit: 3d004cefec5135a3b080dc898d7f7d5452ef309f
https://github.com/openssl/openssl/commit/3d004cefec5135a3b080dc898d7f7d5452ef309f
Author: Matt Caswell <matt at openssl.org>
Date: 2022-11-14 (Mon, 14 Nov 2022)
Changed paths:
M ssl/record/rec_layer_s3.c
Log Message:
-----------
Use the same encryption growth macro consistently
We had two different macros for calculating the potential growth due to
encryption. The macro we use for allocating the underlying buffer should be
the same one that we use for reserving bytes for encryption growth.
Also if we are adding the MAC independently of the cipher algorithm then
the encryption growth will not include that MAC so we should remove it
from the amount of bytes that we reserve for that growth. Otherwise we
might exceed our buffer size and the WPACKET_reserve operation will
fail.
Reviewed-by: Hugo Landau <hlandau at openssl.org>
Reviewed-by: Tomas Mraz <tomas at openssl.org>
Reviewed-by: Paul Dale <pauli at openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19264)
More information about the openssl-commits
mailing list