summaryrefslogtreecommitdiff
path: root/modules/arch
diff options
context:
space:
mode:
authorGuenter Knauf <fuankg@apache.org>2013-02-07 15:35:31 +0000
committerGuenter Knauf <fuankg@apache.org>2013-02-07 15:35:31 +0000
commit0a73b54481814418ea7b5141e2fd3cb4799f7029 (patch)
treeaa5fea0b5bd53469693ffa0b6eb4939a9d1287c1 /modules/arch
parent928a8cf3d5fe980df3336fa4e4635d01a9700588 (diff)
downloadhttpd-0a73b54481814418ea7b5141e2fd3cb4799f7029.tar.gz
Fixed a potential NULL pointer deference.
This was brought up on dev list by Christophe Jaillet. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1443558 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/arch')
-rw-r--r--modules/arch/netware/mod_nw_ssl.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/modules/arch/netware/mod_nw_ssl.c b/modules/arch/netware/mod_nw_ssl.c
index 652bc62967..a6e15e7f0c 100644
--- a/modules/arch/netware/mod_nw_ssl.c
+++ b/modules/arch/netware/mod_nw_ssl.c
@@ -1165,6 +1165,14 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
*/
ap_remove_output_filter(f);
+ if (!r) {
+ /*
+ ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02131)
+ "Unable to get upgradeable socket handle");
+ */
+ return ap_pass_brigade(f->next, bb);
+ }
+
/* No need to ensure that this is a server with optional SSL, the filter
* is only inserted if that is true.
*/
@@ -1178,15 +1186,8 @@ static apr_status_t ssl_io_filter_Upgrade(ap_filter_t *f,
apr_table_unset(r->headers_out, "Upgrade");
- if (r) {
- csd_data = (secsocket_data*)ap_get_module_config(r->connection->conn_config, &nwssl_module);
- csd = csd_data->csd;
- }
- else {
- ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server, APLOGNO(02131)
- "Unable to get upgradeable socket handle");
- return ap_pass_brigade(f->next, bb);
- }
+ csd_data = (secsocket_data*)ap_get_module_config(r->connection->conn_config, &nwssl_module);
+ csd = csd_data->csd;
/* Send the interim 101 response. */
upgradebb = apr_brigade_create(r->pool, f->c->bucket_alloc);