This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Making strict et al propagate into autoloaded subroutines seems a
[perl5.git] / pp_sys.c
index e71eecd..6754c3e 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1485,6 +1485,8 @@ PP(pp_prtf)
        goto just_say_no;
     }
     else {
+       if (SvTAINTED(MARK[1]))
+           TAINT_PROPER("printf");
        do_sprintf(sv, SP - MARK, MARK + 1);
        if (!do_print(sv, fp))
            goto just_say_no;
@@ -2908,9 +2910,9 @@ PP(pp_stat)
        PUSHs(sv_2mortal(newSVnv(PL_statcache.st_mtime)));
        PUSHs(sv_2mortal(newSVnv(PL_statcache.st_ctime)));
 #else
-       PUSHs(sv_2mortal(newSViv(PL_statcache.st_atime)));
-       PUSHs(sv_2mortal(newSViv(PL_statcache.st_mtime)));
-       PUSHs(sv_2mortal(newSViv(PL_statcache.st_ctime)));
+       PUSHs(sv_2mortal(newSViv((IV)PL_statcache.st_atime)));
+       PUSHs(sv_2mortal(newSViv((IV)PL_statcache.st_mtime)));
+       PUSHs(sv_2mortal(newSViv((IV)PL_statcache.st_ctime)));
 #endif
 #ifdef USE_STAT_BLOCKS
        PUSHs(sv_2mortal(newSVuv(PL_statcache.st_blksize)));