diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-13 10:10:46 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2003-09-13 10:10:46 +0000 |
commit | 7e72d50951f9200af403999824e9d3fc17f03570 (patch) | |
tree | e09b646c1fae6da3afd4885f65ff388d0f6404d9 /doio.c | |
parent | c2be40b189b2d5e759e6de4217ec02ed2234bc6c (diff) | |
download | perl-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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) || |