summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-04-27 16:27:18 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-04-27 16:27:18 +0000
commit40d98b499c15c6fadd7a92e47cf92625dad3fb51 (patch)
tree07326b0c7773c698b8333ed82bfdd6ab59b27bc5 /pp_sys.c
parent5e2f386fc38c94eafc4221e60a528640a97c2adf (diff)
downloadperl-40d98b499c15c6fadd7a92e47cf92625dad3fb51.tar.gz
Integrate perlio:
[ 16216] Fix weird warnings and/pr segfaults on binmode(,"encoding(...)") - if encoding loads Encode then stack grows. - pp_binmode was not allowing for that to happen - added PUTBACK/SPAGAIN. p4raw-link: @16216 on //depot/perlio: adb5c314284816e1c92cd8e29c9033c3ce18b580 p4raw-id: //depot/perl@16220 p4raw-integrated: from //depot/perlio@16219 'copy in' pp_sys.c (@16064..)
Diffstat (limited to 'pp_sys.c')
-rw-r--r--pp_sys.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 03b1634c56..0183325cb9 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -731,11 +731,16 @@ PP(pp_binmode)
RETPUSHUNDEF;
}
+ PUTBACK;
if (PerlIO_binmode(aTHX_ fp,IoTYPE(io),mode_from_discipline(discp),
- (discp) ? SvPV_nolen(discp) : Nullch))
+ (discp) ? SvPV_nolen(discp) : Nullch)) {
+ SPAGAIN;
RETPUSHYES;
- else
+ }
+ else {
+ SPAGAIN;
RETPUSHUNDEF;
+ }
}
PP(pp_tie)
@@ -4040,7 +4045,7 @@ PP(pp_system)
TAINT_ENV();
while (++MARK <= SP) {
(void)SvPV_nolen(*MARK); /* stringify for taint check */
- if (PL_tainted)
+ if (PL_tainted)
break;
}
MARK = ORIGMARK;
@@ -4166,7 +4171,7 @@ PP(pp_exec)
TAINT_ENV();
while (++MARK <= SP) {
(void)SvPV_nolen(*MARK); /* stringify for taint check */
- if (PL_tainted)
+ if (PL_tainted)
break;
}
MARK = ORIGMARK;