summaryrefslogtreecommitdiff
path: root/perl.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-03-08 21:53:06 +0000
committerNicholas Clark <nick@ccl4.org>2006-03-08 21:53:06 +0000
commite49e380eaec0ac30de05f118388e614b3b7bbed9 (patch)
treecec90cf02ddfa3723c4464fc8695a7c4e7718d8b /perl.c
parentc56915e340452a59ad21c8067931b8949e1b3204 (diff)
downloadperl-e49e380eaec0ac30de05f118388e614b3b7bbed9.tar.gz
Oops. Didn't mean to commit 27426 to maint first. Integrate it:
Avoid writing over the input string in the case 'F' in moreswitches. p4raw-id: //depot/perl@27427 p4raw-integrated: from //depot/maint-5.8/perl@27425 'merge in' perl.c (@27318..)
Diffstat (limited to 'perl.c')
-rw-r--r--perl.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/perl.c b/perl.c
index a931a78a77..0ad1e00f57 100644
--- a/perl.c
+++ b/perl.c
@@ -3010,8 +3010,7 @@ Perl_moreswitches(pTHX_ char *s)
PL_minus_F = TRUE;
PL_splitstr = ++s;
while (*s && !isSPACE(*s)) ++s;
- *s = '\0';
- PL_splitstr = savepv(PL_splitstr);
+ PL_splitstr = savepvn(PL_splitstr, s - PL_splitstr);
return s;
case 'a':
PL_minus_a = TRUE;