提交 d15f5df7 编写于 作者: J Jonas Maebe 提交者: Kurt Roeckx

dtls1_process_heartbeat: check for NULL after allocating buffer

Signed-off-by: NKurt Roeckx <kurt@roeckx.be>
Reviewed-by: NRichard Levitte <levitte@openssl.org>
上级 b1a08ac7
...@@ -1392,6 +1392,8 @@ dtls1_process_heartbeat(SSL *s) ...@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册