From d8b191a1f37ca3f5331afa25480d49612335b674 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 15 May 2008 07:58:01 +0200 Subject: bugfix: TLS server went into an endless loop in some situations. Thanks to Michael Biebl for reporting the problem. --- runtime/nsd_gtls.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/nsd_gtls.c') diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 03ceba7b..be3910f9 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -534,6 +534,12 @@ Rcv(nsd_t *pNsd, uchar *pBuf, ssize_t *pLenBuf) /* in TLS mode now */ lenRcvd = gnutls_record_recv(pThis->sess, pBuf, *pLenBuf); + if(lenRcvd < 0) { +int gnuRet; /* this is a hack */ + *pLenBuf = -1; + CHKgnutls(lenRcvd); /* this will abort the function */ + } + *pLenBuf = lenRcvd; finalize_it: -- cgit