fix stupid openssl crash
authordiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 19 Mar 2011 05:02:37 +0000 (05:02 +0000)
committerdiscomfitor <discomfitor@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 19 Mar 2011 05:02:37 +0000 (05:02 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/ecore@57878 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

ChangeLog
src/lib/ecore_con/ecore_con_ssl.c

index e1afe7b..df38601 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -84,3 +84,7 @@
 2011-03-16 Cedric Bail
 
        * Add ecore_thread_reschedule.
+
+2011-03-19 Mike Blumenkrantz
+
+        * Fix crash in ecore_con_ssl related to attempted connections on a dead socket
index 95e22fe..ef11ad0 100644 (file)
@@ -1308,6 +1308,7 @@ _ecore_con_ssl_server_read_openssl(Ecore_Con_Server *svr,
 {
    int num;
 
+   if (!svr->ssl) return -1;
    num = SSL_read(svr->ssl, buf, size);
    svr->ssl_err = SSL_get_error(svr->ssl, num);
 
@@ -1460,6 +1461,7 @@ _ecore_con_ssl_client_read_openssl(Ecore_Con_Client *cl,
 {
    int num;
 
+   if (!cl->ssl) return -1;
    num = SSL_read(cl->ssl, buf, size);
    cl->ssl_err = SSL_get_error(cl->ssl, num);