From b64627cdaeb74afc109d9ae38a18c0b6909be59b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Mon, 20 May 2019 12:49:51 +0200 Subject: gnutls_session_set_data(): Check for allocation error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tim Rühsen --- lib/session.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/session.c b/lib/session.c index 10b19abb4e..68d1cebe5c 100644 --- a/lib/session.c +++ b/lib/session.c @@ -305,7 +305,11 @@ gnutls_session_set_data(gnutls_session_t session, if (session->internals.resumption_data.data != NULL) gnutls_free(session->internals.resumption_data.data); - _gnutls_set_datum(&session->internals.resumption_data, session_data, session_data_size); + ret = _gnutls_set_datum(&session->internals.resumption_data, session_data, session_data_size); + if (ret < 0) { + gnutls_assert(); + return ret; + } return 0; } -- cgit v1.2.1