diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-03-01 22:39:24 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-03-01 22:39:24 +0000 |
commit | 95a2b409a511e1c8014f7610e7fa60a947660625 (patch) | |
tree | d21487e6ffdb21d663c16ebb89d2551ed53d7ca8 /perl.c | |
parent | 5331cfbbba9a62f9d33d2eaa5b55de8f825fb2d1 (diff) | |
download | perl-95a2b409a511e1c8014f7610e7fa60a947660625.tar.gz |
Don't put strings with embedded NULs in the environment.
This makes things like -d:Foo=bar work again.
p4raw-id: //depot/perl@27359
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3031,7 +3031,9 @@ Perl_moreswitches(pTHX_ char *s) 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)); |