summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-09-13 10:10:46 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-09-13 10:10:46 +0000
commit7e72d50951f9200af403999824e9d3fc17f03570 (patch)
treee09b646c1fae6da3afd4885f65ff388d0f6404d9 /doio.c
parentc2be40b189b2d5e759e6de4217ec02ed2234bc6c (diff)
downloadperl-7e72d50951f9200af403999824e9d3fc17f03570.tar.gz
Apparently at some point doing 3-arg open with
illegal mode like ">>>" had stopped croaking. p4raw-id: //depot/perl@21206
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 0c105191be..3bad8f343b 100644
--- a/doio.c
+++ b/doio.c
@@ -422,6 +422,8 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp);
}
} /* !& */
+ if (!fp && type && *type && *type != ':' && !isIDFIRST(*type))
+ goto unknown_open_mode;
} /* IoTYPE_WRONLY */
else if (*type == IoTYPE_RDONLY) {
/*SUPPRESS 530*/
@@ -453,6 +455,8 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
}
fp = PerlIO_openn(aTHX_ type,mode,-1,0,0,NULL,num_svs,svp);
}
+ if (!fp && type && *type && *type != ':' && !isIDFIRST(*type))
+ goto unknown_open_mode;
} /* IoTYPE_RDONLY */
else if ((num_svs && /* '-|...' or '...|' */
type[0] == IoTYPE_STD && type[1] == IoTYPE_PIPE) ||