From: Kamil Dudka Date: Fri, 18 Sep 2015 15:07:22 +0000 (+0200) Subject: nss: check return values of NSS functions X-Git-Tag: curl-7_45_0~43 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a9fd53887ba07cd8313a8b9706f2dc71d6b8ed1b;p=curl nss: check return values of NSS functions --- diff --git a/lib/vtls/nss.c b/lib/vtls/nss.c index c66c60b56..048273cf2 100644 --- a/lib/vtls/nss.c +++ b/lib/vtls/nss.c @@ -1798,9 +1798,13 @@ static CURLcode nss_setup_connect(struct connectdata *conn, int sockindex) /* Force handshake on next I/O */ - SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE); + if(SSL_ResetHandshake(connssl->handle, /* asServer */ PR_FALSE) + != SECSuccess) + goto error; - SSL_SetURL(connssl->handle, conn->host.name); + /* propagate hostname to the TLS layer */ + if(SSL_SetURL(connssl->handle, conn->host.name) != SECSuccess) + goto error; return CURLE_OK;