diff options
author | Gisle Aas <gisle@activestate.com> | 2006-01-11 09:52:18 +0000 |
---|---|---|
committer | Gisle Aas <gisle@activestate.com> | 2006-01-11 09:52:18 +0000 |
commit | a2722ac963c473daf784eb7bed19dab587ac5fe6 (patch) | |
tree | f27669fcacf60c3d00a4728fd26e8c55b50264a2 /perl.c | |
parent | 7b3f41f48f08e2c852bc36ce5a178ec9102a33f7 (diff) | |
download | perl-a2722ac963c473daf784eb7bed19dab587ac5fe6.tar.gz |
Make setting 'PL_origalen = 1' before perl_parse() disable
argv[0] munging when $0 is assigned to.
p4raw-id: //depot/perl@26779
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1439,7 +1439,10 @@ setuid perl scripts securely.\n"); PL_origargc = argc; PL_origargv = argv; - { + if (PL_origalen != 0) { + PL_origalen = 1; /* don't use old PL_origalen if perl_parse() is called again */ + } + else { /* Set PL_origalen be the sum of the contiguous argv[] * elements plus the size of the env in case that it is * contiguous with the argv[]. This is used in mg.c:Perl_magic_set() |