You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by fu...@apache.org on 2013/02/07 16:35:31 UTC
svn commit: r1443558 - in /httpd/httpd:
branches/2.4.x/modules/arch/netware/mod_nw_ssl.c
trunk/modules/arch/netware/mod_nw_ssl.c
Author: fuankg
Date: Thu Feb 7 15:35:31 2013
New Revision: 1443558
URL: http://svn.apache.org/viewvc?rev=1443558&view=rev
Log:
Fixed a potential NULL pointer deference.
This was brought up on dev list by Christophe Jaillet.
Modified:
httpd/httpd/branches/2.4.x/modules/arch/netware/mod_nw_ssl.c
httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
Modified: httpd/httpd/branches/2.4.x/modules/arch/netware/mod_nw_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/arch/netware/mod_nw_ssl.c?rev=1443558&r1=1443557&r2=1443558&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/arch/netware/mod_nw_ssl.c (original)
+++ httpd/httpd/branches/2.4.x/modules/arch/netware/mod_nw_ssl.c Thu Feb 7 15:35:31 2013
@@ -1165,6 +1165,14 @@ static apr_status_t ssl_io_filter_Upgrad
*/
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_Upgrad
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);
Modified: httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c?rev=1443558&r1=1443557&r2=1443558&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c (original)
+++ httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c Thu Feb 7 15:35:31 2013
@@ -1165,6 +1165,14 @@ static apr_status_t ssl_io_filter_Upgrad
*/
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_Upgrad
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);