projects
/
platform
/
upstream
/
perl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5331cfb
)
Don't put strings with embedded NULs in the environment.
author
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Wed, 1 Mar 2006 22:39:24 +0000
(22:39 +0000)
committer
Rafael Garcia-Suarez
<rgarciasuarez@gmail.com>
Wed, 1 Mar 2006 22:39:24 +0000
(22:39 +0000)
This makes things like -d:Foo=bar work again.
p4raw-id: //depot/perl@27359
perl.c
patch
|
blob
|
history
diff --git
a/perl.c
b/perl.c
index 7b6b4c79bf927eed475ae71f64a5e9f8feaf3917..d8077d6027a9aa30b6b183e0731dcd9626b2d636 100644
(file)
--- a/
perl.c
+++ b/
perl.c
@@
-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));