Skip to content
Snippets Groups Projects
Commit 288b4e4f authored by Jonas Maebe's avatar Jonas Maebe Committed by Kurt Roeckx
Browse files

tls1_heartbeat: check for NULL after allocating buf


Signed-off-by: default avatarKurt Roeckx <kurt@roeckx.be>
Reviewed-by: default avatarMatt Caswell <matt@openssl.org>
parent c27dc398
No related branches found
No related tags found
No related merge requests found
......@@ -4094,6 +4094,11 @@ tls1_heartbeat(SSL *s)
* - Padding
*/
buf = OPENSSL_malloc(1 + 2 + payload + padding);
if (buf == NULL)
{
SSLerr(SSL_F_TLS1_HEARTBEAT,ERR_R_MALLOC_FAILURE);
return -1;
}
p = buf;
/* Message Type */
*p++ = TLS1_HB_REQUEST;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment