This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #128996) prevent PL_op pointing to freed ops
[perl5.git] / doio.c
diff --git a/doio.c b/doio.c
index 2dc7082..b8f3c28 100644 (file)
--- a/doio.c
+++ b/doio.c
@@ -1845,18 +1845,8 @@ Perl_apply(pTHX_ I32 type, SV **mark, SV **sp)
                         int fd = PerlIO_fileno(IoIFP(GvIOn(gv)));
                        APPLY_TAINT_PROPER();
                         if (fd < 0) {
-                           SETERRNO(EBADF,RMS_IFI);
-                           tot--;
-#if Uid_t_sign == 1
-                       } else if (val < 0) {
-                           SETERRNO(EINVAL,LIB_INVARG);
-                           tot--;
-#endif
-#if Gid_t_sign == 1
-                       } else if (val2 < 0) {
-                           SETERRNO(EINVAL,LIB_INVARG);
+                            SETERRNO(EBADF,RMS_IFI);
                            tot--;
-#endif
                         } else if (fchown(fd, val, val2))
                            tot--;
 #else