summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl.c b/perl.c
index 464a49b0d9..97b0c38238 100644
--- a/perl.c
+++ b/perl.c
@@ -668,6 +668,7 @@ setuid perl scripts securely.\n");
s = argv[0]+1;
reswitch:
switch (*s) {
+ case ' ':
case '0':
case 'F':
case 'a':
@@ -1562,8 +1563,11 @@ moreswitches(char *s)
inplace = savepv(s+1);
/*SUPPRESS 530*/
for (s = inplace; *s && !isSPACE(*s); s++) ;
- if (*s)
+ if (*s) {
*s++ = '\0';
+ if (*s == '-') /* Additional switches on #! line. */
+ s++;
+ }
return s;
case 'I': /* -I handled both here and in parse_perl() */
forbid_setid("-I");