Commit d15f5df7 authored by Jonas Maebe's avatar Jonas Maebe Committed by Kurt Roeckx
Browse files

dtls1_process_heartbeat: check for NULL after allocating buffer

parent b1a08ac7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1392,6 +1392,8 @@ dtls1_process_heartbeat(SSL *s)
		 * payload, plus padding
		 */
		buffer = OPENSSL_malloc(write_length);
		if (buffer == NULL)
			return -1;
		bp = buffer;

		/* Enter response type, length and copy payload */