]> granicus.if.org Git - apache/commitdiff
bandaid for segv in ssl_io_filter_Output
authorDoug MacEachern <dougm@apache.org>
Tue, 24 Jul 2001 19:00:12 +0000 (19:00 +0000)
committerDoug MacEachern <dougm@apache.org>
Tue, 24 Jul 2001 19:00:12 +0000 (19:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89681 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_engine_io.c

index f89ef4df060b95a7a1bdc79fab865ed9f1d3e7b3..8e03e52597c58964cf109981359c28da371b916c 100644 (file)
@@ -323,7 +323,17 @@ apr_status_t ssl_io_filter_Output(ap_filter_t *f,apr_bucket_brigade *pbbIn)
 {
     SSLFilterRec *pRec=f->ctx;
     apr_bucket *pbktIn;
-conn_rec *c = SSL_get_app_data (pRec->pssl);
+    conn_rec *c = SSL_get_app_data (pRec->pssl);
+
+    if (!c) {
+        /* if this happens we have already called ssl_hook_CloseConnection
+         * if we dont return here, this routine will segv
+         * XXX: this doesnt seem right, ssl_hook_CloseConnection probably 
+         * is being called to early, but as the README:TODO says:
+         * "Cleanup ssl_engine_io.c !!"
+         */
+        return APR_EOF;
+    }
 
     APR_BRIGADE_FOREACH(pbktIn,pbbIn) {
        const char *data;