From 9b0955f4bd0b0ba9534e309a20b55847c1a4c07b Mon Sep 17 00:00:00 2001 From: jsing <> Date: Tue, 15 Sep 2020 15:11:58 +0000 Subject: Correct a failure case in tls12_record_layer_seal_record_protected() This should be a 'goto err' rather than returning. --- src/lib/libssl/tls12_record_layer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/libssl/tls12_record_layer.c') diff --git a/src/lib/libssl/tls12_record_layer.c b/src/lib/libssl/tls12_record_layer.c index 5e7a3a610c..d1686cb5bd 100644 --- a/src/lib/libssl/tls12_record_layer.c +++ b/src/lib/libssl/tls12_record_layer.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tls12_record_layer.c,v 1.1 2020/08/30 15:40:20 jsing Exp $ */ +/* $OpenBSD: tls12_record_layer.c,v 1.2 2020/09/15 15:11:58 jsing Exp $ */ /* * Copyright (c) 2020 Joel Sing * @@ -457,7 +457,7 @@ tls12_record_layer_seal_record_protected_cipher(struct tls12_record_layer *rl, /* Add padding to block size, if necessary. */ block_size = EVP_CIPHER_CTX_block_size(enc); if (block_size < 0 || block_size > EVP_MAX_BLOCK_LENGTH) - return 0; + goto err; if (block_size > 1) { pad_len = block_size - (plain_len % block_size); pad_val = pad_len - 1; -- cgit v1.2.3-55-g6feb