dtls1_process_heartbeat: check for NULL after allocating buffer
Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
b1a08ac71f
commit
d15f5df70d
@ -1392,6 +1392,8 @@ dtls1_process_heartbeat(SSL *s)
|
|||||||
* payload, plus padding
|
* payload, plus padding
|
||||||
*/
|
*/
|
||||||
buffer = OPENSSL_malloc(write_length);
|
buffer = OPENSSL_malloc(write_length);
|
||||||
|
if (buffer == NULL)
|
||||||
|
return -1;
|
||||||
bp = buffer;
|
bp = buffer;
|
||||||
|
|
||||||
/* Enter response type, length and copy payload */
|
/* Enter response type, length and copy payload */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user