diff options
author | Tony Cook <tony@develop-help.com> | 2015-05-26 16:03:31 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2015-06-03 15:12:55 +1000 |
commit | 0c9375a5ca42fadd4d631bf07a8dd4d8f7814d34 (patch) | |
tree | e613da04759a46e7988374e7dd6252b99c6c00fc /doio.c | |
parent | ef5cf9f5e65d5aeb89a77dcc06c7367c6926f014 (diff) | |
download | perl-0c9375a5ca42fadd4d631bf07a8dd4d8f7814d34.tar.gz |
[perl #125115] don't create file GLOB(...) when dupping a closed handle
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -438,8 +438,11 @@ Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len, else if (IoTYPE(thatio) == IoTYPE_SOCKET) IoTYPE(io) = IoTYPE_SOCKET; } - else - wanted_fd = -1; + else { + SETERRNO(EBADF, RMS_IFI); + fp = NULL; + goto say_false; + } } if (!num_svs) type = NULL; |