This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
More paranoia.
[perl5.git] / pp_sys.c
index 33eddca..afac5ab 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1667,6 +1667,7 @@ PP(pp_send)
        else
 #endif
        {
+           /* See the note at doio.c:do_print about filesize limits. --jhi */
            length = PerlLIO_write(PerlIO_fileno(IoIFP(io)),
                                   buffer+offset, length);
        }
@@ -1764,7 +1765,7 @@ PP(pp_sysseek)
     djSP;
     GV *gv;
     int whence = POPi;
-    Off_t offset = POPl;
+    Off_t offset = (Off_t)SvIVx(POPs);
     MAGIC *mg;
 
     gv = PL_last_in_gv = (GV*)POPs;
@@ -5000,7 +5001,7 @@ fcntl_emulate_flock(int fd, int operation)
        return -1;
     }
     flock.l_whence = SEEK_SET;
-    flock.l_start = flock.l_len = 0L;
+    flock.l_start = flock.l_len = (Off_t)0;
  
     return fcntl(fd, (operation & LOCK_NB) ? F_SETLK : F_SETLKW, &flock);
 }