summaryrefslogtreecommitdiff
path: root/vchat-protocol.c
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2014-11-16 01:45:00 +0100
committerDirk Engling <erdgeist@erdgeist.org>2014-11-16 01:45:00 +0100
commit1d4c7b4858f467289b3bf5592b772a9526abe0c3 (patch)
treeb39e0d0d54dc7d39562886e49db179efe5491756 /vchat-protocol.c
parent4c635b85709b33f5161674fcea273d5739d484fe (diff)
Check for error allocating tls struct
Diffstat (limited to 'vchat-protocol.c')
-rwxr-xr-xvchat-protocol.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vchat-protocol.c b/vchat-protocol.c
index 6532fbb..88631ef 100755
--- a/vchat-protocol.c
+++ b/vchat-protocol.c
@@ -128,7 +128,12 @@ vcconnect (char *server, char *port)
128 /* If SSL is requested, get our ssl-BIO running */ 128 /* If SSL is requested, get our ssl-BIO running */
129 if( server_conn && getintoption(CF_USESSL) ) { 129 if( server_conn && getintoption(CF_USESSL) ) {
130 vc_store = vc_init_x509store(); 130 vc_store = vc_init_x509store();
131 // XXX TODO: Check error (with new API) 131 if( !vc_store ) {
132 snprintf (tmpstr, TMPSTRSIZE, getformatstr(FS_ERR), "Out of memory" );
133 writechan (tmpstr);
134 return -1;
135 }
136
132 vc_x509store_setflags(vc_store, VC_X509S_SSL_VERIFY_PEER); 137 vc_x509store_setflags(vc_store, VC_X509S_SSL_VERIFY_PEER);
133 138
134 /* get name of certificate file */ 139 /* get name of certificate file */