diff options
author | Matt Caswell <matt@openssl.org> | 2023-11-13 11:27:54 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2023-11-15 11:07:16 +0100 |
commit | 2aba9548c4a0a3f8359ab5476df3ad58f1cbcf06 (patch) | |
tree | b5e721c37c66d396e3abce93130ac4461452cd4c | |
parent | 50c56768e184f1c0559d1c88d09d5db001221f28 (diff) |
Correct tag len check when determining how much space we have in the pkt
If the available space is equal to the tag length then we have no available
space for plaintext data.
Fixes #22699
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22715)
(cherry picked from commit 46376fcf4b6d11ec417c2a530475037d4d09fcbf)
-rw-r--r-- | ssl/quic/quic_record_tx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ssl/quic/quic_record_tx.c b/ssl/quic/quic_record_tx.c index 4f86c68e17..c01abed0d6 100644 --- a/ssl/quic/quic_record_tx.c +++ b/ssl/quic/quic_record_tx.c @@ -422,7 +422,7 @@ int ossl_qtx_calculate_plaintext_payload_len(OSSL_QTX *qtx, uint32_t enc_level, tag_len = ossl_qrl_get_suite_cipher_tag_len(el->suite_id); - if (ciphertext_len < tag_len) { + if (ciphertext_len <= tag_len) { *plaintext_len = 0; return 0; } |