This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Moving variables to their innermost scope.
[perl5.git] / taint.c
diff --git a/taint.c b/taint.c
index f1f6b7b..1b78928 100644 (file)
--- a/taint.c
+++ b/taint.c
@@ -78,7 +78,6 @@ void
 Perl_taint_env(pTHX)
 {
     SV** svp;
-    MAGIC* mg;
     const char* const *e;
     static const char* const misc_env[] = {
        "IFS",          /* most shells' inter-field separators */
@@ -121,6 +120,7 @@ Perl_taint_env(pTHX)
     STRLEN len = 8; /* strlen(name)  */
 
     while (1) {
+        MAGIC* mg;
        if (i)
            len = my_sprintf(name,"DCL$PATH;%d", i);
        svp = hv_fetch(GvHVn(PL_envgv), name, len, FALSE);
@@ -141,6 +141,7 @@ Perl_taint_env(pTHX)
 
     svp = hv_fetchs(GvHVn(PL_envgv),"PATH",FALSE);
     if (svp && *svp) {
+        MAGIC* mg;
        if (SvTAINTED(*svp)) {
            TAINT;
            taint_proper("Insecure %s%s", "$ENV{PATH}");