diff options
author | Craig A. Berry <craigberry@mac.com> | 2001-10-03 09:30:55 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-03 18:38:34 +0000 |
commit | 22be8b3ce79e213f2d415174c221bf661da5963b (patch) | |
tree | ffdf80fe4e72f25105a3752db37d0f56321603ac /vms | |
parent | 9b4e380a0c2cfcae174bddd911f9f6437cd7d53f (diff) | |
download | perl-22be8b3ce79e213f2d415174c221bf661da5963b.tar.gz |
%ENV tainting for VMS
Message-Id: <5.1.0.14.0.20011003124800.01bd31c0@exchi01>
p4raw-id: //depot/perl@12321
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -424,6 +424,7 @@ prime_env_iter(void) { static int primed = 0; HV *seenhv = NULL, *envhv; + SV *sv = NULL; char cmd[LNM$C_NAMLENGTH+24], mbxnam[LNM$C_NAMLENGTH], *buf = Nullch; unsigned short int chan; #ifndef CLI$M_TRUSTED @@ -497,8 +498,9 @@ prime_env_iter(void) } else { start++; - (void) hv_store(envhv,environ[j],start - environ[j] - 1, - newSVpv(start,0),0); + sv = newSVpv(start,0); + SvTAINTED_on(sv); + (void) hv_store(envhv,environ[j],start - environ[j] - 1,sv,0); } } continue; @@ -587,7 +589,9 @@ prime_env_iter(void) continue; } PERL_HASH(hash,key,keylen); - hv_store(envhv,key,keylen,newSVpvn(cp2,cp1 - cp2 + 1),hash); + sv = newSVpvn(cp2,cp1 - cp2 + 1); + SvTAINTED_on(sv); + hv_store(envhv,key,keylen,sv,hash); hv_store(seenhv,key,keylen,&PL_sv_yes,hash); } if (cmddsc.dsc$w_length == 14) { /* We just read LNM$FILE_DEV */ @@ -597,7 +601,9 @@ prime_env_iter(void) int trnlen, i; for (i = 0; ppfs[i]; i++) { trnlen = vmstrnenv(ppfs[i],eqv,0,fildev,0); - hv_store(envhv,ppfs[i],strlen(ppfs[i]),newSVpv(eqv,trnlen),0); + sv = newSVpv(eqv,trnlen); + SvTAINTED_on(sv); + hv_store(envhv,ppfs[i],strlen(ppfs[i]),sv,0); } } } |