Initial malloc path already does this. Realloc path went to failure
without recording a fatal alert.
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28873)
*keyshares_max + GROUPLIST_INCREMENT,
sizeof(**keyshares_arr));
- if (tmp == NULL)
+ if (tmp == NULL) {
+ SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
goto failure;
+ }
+
*keyshares_arr = tmp;
tmp_pkt =
OPENSSL_realloc_array(*encoded_pubkey_arr,
*keyshares_max + GROUPLIST_INCREMENT,
sizeof(**encoded_pubkey_arr));
- if (tmp_pkt == NULL)
+ if (tmp_pkt == NULL) {
+ SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
goto failure;
+ }
+
*encoded_pubkey_arr = tmp_pkt;
*keyshares_max += GROUPLIST_INCREMENT;
}