dtls1_heartbeat: check for NULL after allocating s->cert->ctypes
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
d15f5df70d
commit
241e2dc936
@ -1481,6 +1481,11 @@ dtls1_heartbeat(SSL *s)
|
||||
* - Padding
|
||||
*/
|
||||
buf = OPENSSL_malloc(1 + 2 + payload + padding);
|
||||
if (buf == NULL)
|
||||
{
|
||||
SSLerr(SSL_F_DTLS1_HEARTBEAT, ERR_R_MALLOC_FAILURE);
|
||||
return -1;
|
||||
}
|
||||
p = buf;
|
||||
/* Message Type */
|
||||
*p++ = TLS1_HB_REQUEST;
|
||||
|
Loading…
x
Reference in New Issue
Block a user