mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
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)
This commit is contained in:
parent
aa6ac60728
commit
46376fcf4b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user