If there is a memory failure during record wrlmethod allocation, then
the alert is attemted but it crashes because wrlmethod is NULL.
Found using memfail integration to fuzz tests: GH-30944
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Fri May 1 12:09:11 2026
(Merged from https://github.com/openssl/openssl/pull/31017)
return;
ossl_statem_set_in_init(s, 1);
s->statem.state = MSG_FLOW_ERROR;
- if (al != SSL_AD_NO_ALERT)
+ if (al != SSL_AD_NO_ALERT && s->rlayer.wrlmethod != NULL)
ssl3_send_alert(s, SSL3_AL_FATAL, al);
}