Author: gozer
Date: Mon May 14 14:44:30 2007
New Revision: 537990

URL: http://svn.apache.org/viewvc?view=rev&rev=537990
Log:
Fix a bug that could cause a carsh when using $r->push_handlers()
multiple times for a phase that had no configured handlers.

Submitted-By: Torsten Foertsch <[EMAIL PROTECTED]>
Reviewed-By: Philippe M. Chiasson
Message-Id: <[EMAIL PROTECTED]>


Modified:
    perl/modperl/trunk/Changes
    perl/modperl/trunk/src/modules/perl/modperl_handler.c

Modified: perl/modperl/trunk/Changes
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/Changes?view=diff&rev=537990&r1=537989&r2=537990
==============================================================================
--- perl/modperl/trunk/Changes (original)
+++ perl/modperl/trunk/Changes Mon May 14 14:44:30 2007
@@ -12,6 +12,9 @@
 
 =item 2.0.4-dev
 
+Fix a bug that could cause a crash when using $r->push_handlers() multiple
+times for a phase that has no configured handlers [Torsten Foertsch]
+
 Catch up with some httpd API changes
   2.2.4: 
    The full server version information is now included in the error log at

Modified: perl/modperl/trunk/src/modules/perl/modperl_handler.c
URL: 
http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_handler.c?view=diff&rev=537990&r1=537989&r2=537990
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_handler.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_handler.c Mon May 14 14:44:30 
2007
@@ -427,7 +427,8 @@
         /* just a lookup */
         break;
       case MP_HANDLER_ACTION_PUSH:
-        if (ravp && !*ravp) {
+        if (ravp) {
+        if (!*ravp) {
             if (*avp) {
                 /* merge with existing configured handlers */
                 *ravp = apr_array_copy(p, *avp);
@@ -436,6 +437,7 @@
                 /* no request handlers have been previously pushed or set */
                 *ravp = modperl_handler_array_new(p);
             }
+        }
         }
         else if (!*avp) {
             /* directly modify the configuration at startup time */


Reply via email to