perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go...@apache.org
Subject svn commit: r643753 - in /perl/modperl/branches/1.x: Changes src/modules/perl/Apache.xs
Date Wed, 02 Apr 2008 06:05:29 GMT
Author: gozer
Date: Tue Apr  1 23:05:27 2008
New Revision: 643753

URL: http://svn.apache.org/viewvc?rev=643753&view=rev
Log:
Fix potential segfault when the environment contains
NULL values

Reviewed-By: gozer
Submitted-By: Mike Schilli <m@perlmeister.com>
Message-ID: <20080305112503.Q46648@spiral.corp.yahoo.com>

Modified:
    perl/modperl/branches/1.x/Changes
    perl/modperl/branches/1.x/src/modules/perl/Apache.xs

Modified: perl/modperl/branches/1.x/Changes
URL: http://svn.apache.org/viewvc/perl/modperl/branches/1.x/Changes?rev=643753&r1=643752&r2=643753&view=diff
==============================================================================
--- perl/modperl/branches/1.x/Changes (original)
+++ perl/modperl/branches/1.x/Changes Tue Apr  1 23:05:27 2008
@@ -10,6 +10,9 @@
 
 =item 1.31-dev
 
+Fix potential segfault when the environment contains
+NULL values [Mike Schilli]
+
 Fix static APACI build against newer apache-1.3.38+
 [Gozer]
 

Modified: perl/modperl/branches/1.x/src/modules/perl/Apache.xs
URL: http://svn.apache.org/viewvc/perl/modperl/branches/1.x/src/modules/perl/Apache.xs?rev=643753&r1=643752&r2=643753&view=diff
==============================================================================
--- perl/modperl/branches/1.x/src/modules/perl/Apache.xs (original)
+++ perl/modperl/branches/1.x/src/modules/perl/Apache.xs Tue Apr  1 23:05:27 2008
@@ -1325,7 +1325,7 @@
 	table_entry *elts = (table_entry *)arr->elts;
 	SP -= items;
 	for (i = 0; i < arr->nelts; ++i) {
-	    if (!elts[i].key) continue;
+	    if (!elts[i].key || !elts[i].val) continue;
 	    PUSHelt(elts[i].key, elts[i].val, 0);
 	}
 	PUTBACK;



Mime
View raw message