Permalink
Browse files

Fixed crash caused by GnuTLS: issue #391.

  • Loading branch information...
1 parent 78beaf7 commit 247a254d7fa3754451386e32b095b69ec8bc19ba @FooBarWidget FooBarWidget committed Dec 12, 2009
Showing with 7 additions and 2 deletions.
  1. +3 −0 NEWS
  2. +4 −2 ext/apache2/Hooks.cpp
View
@@ -10,6 +10,9 @@ Release 2.2.8
by passenger-install-nginx-module. As a result,
passenger-install-nginx-module fails on e.g. out-of-the-box Ubuntu
installations until the user manually installs OpenSSL. Issue #422.
+ * [Apache] Fixed a GnuTLS compatibility issue.
+ mod_gnutls can cause Phusion Passenger to crash because of an unchecked
+ NULL pointer. This problem has now been fixed: issue #391.
* Fixed thread creation issue on Intel Itanium platforms.
This fixes issue #427.
@@ -175,8 +175,10 @@ class Hooks {
env_arr = apr_table_elts(r->subprocess_env);
env_entries = (apr_table_entry_t *) env_arr->elts;
for (int i = 0; i < env_arr->nelts; ++i) {
- result->push_back(env_entries[i].key);
- result->push_back(env_entries[i].val);
+ if (env_entries[i].key != NULL && env_entries[i].val != NULL) {
+ result->push_back(env_entries[i].key);
+ result->push_back(env_entries[i].val);
+ }
}
return result;
}

0 comments on commit 247a254

Please sign in to comment.