This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perl.c: Use TAINT_get, instead of PL_tainting.
authorKarl Williamson <khw@cpan.org>
Fri, 3 Aug 2018 19:25:57 +0000 (13:25 -0600)
committerKarl Williamson <khw@cpan.org>
Sun, 5 Aug 2018 11:52:48 +0000 (05:52 -0600)
The former is designed to be compilable out.

perl.c

diff --git a/perl.c b/perl.c
index 50af15d..30ee577 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -2279,7 +2279,7 @@ S_parse_body(pTHX_ char **env, XSINIT_t xsinit)
        This could possibly be wasteful if PERL_INTERNAL_RAND_SEED is invalid,
        but avoids duplicating the logic from perl_construct().
     */
        This could possibly be wasteful if PERL_INTERNAL_RAND_SEED is invalid,
        but avoids duplicating the logic from perl_construct().
     */
-    if (PL_tainting &&
+    if (TAINT_get &&
         PerlProc_getuid() == PerlProc_geteuid() &&
         PerlProc_getgid() == PerlProc_getegid()) {
         Perl_drand48_init_r(&PL_internal_random_state, seed());
         PerlProc_getuid() == PerlProc_geteuid() &&
         PerlProc_getgid() == PerlProc_getegid()) {
         Perl_drand48_init_r(&PL_internal_random_state, seed());