diff options
Diffstat (limited to 'lib/gnutls_handshake.c')
-rw-r--r-- | lib/gnutls_handshake.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index b80861256b..35e67bb6d5 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -687,6 +687,11 @@ int _gnutls_recv_handshake(SOCKET cd, GNUTLS_STATE state, uint8 ** data, } dataptr = gnutls_realloc(dataptr, length32 + handshake_headers); + if (dataptr == NULL) { + gnutls_assert(); + return GNUTLS_E_MEMORY_ERROR; + } + if (length32 > 0 && data != NULL) *data = gnutls_malloc(length32); |