Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > 4c28fc3052a652da2553e831b24cbdf7 > files > 3

perl-5.8.8-12.2mdv2008.0.src.rpm

Change 27359 by rgs@marais on 2006/03/01 22:39:24

	Don't put strings with embedded NULs in the environment.
	This makes things like -d:Foo=bar work again.

Affected files ...

... //depot/perl/perl.c#737 edit

Differences ...

==== //depot/perl/perl.c#737 (text) ====
Index: perl/perl.c
--- perl/perl.c#736~27334~	2006-02-27 03:06:30.000000000 -0800
+++ perl/perl.c	2006-03-01 14:39:24.000000000 -0800
@@ -3031,7 +3031,9 @@
 		sv_catpv(sv, start);
 	    else {
 		sv_catpvn(sv, start, s-start);
-		Perl_sv_catpvf(aTHX_ sv, " split(/,/,q%c%s%c)", 0, ++s, 0);
+		/* Don't use NUL as q// delimiter here, this string goes in the
+		 * environment. */
+		Perl_sv_catpvf(aTHX_ sv, " split(/,/,q{%s});", ++s);
 	    }
 	    s += strlen(s);
 	    my_setenv("PERL5DB", SvPV_nolen_const(sv));
End of Patch.