diff options
author | Craig A. Berry <craigberry@mac.com> | 2006-06-02 23:18:08 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2006-06-02 23:18:08 +0000 |
commit | 326b5008ebd8d91bf6b00d96127d2d711c9f2132 (patch) | |
tree | 4a6d0f4da209432277f18b6139eca7cb7ea7dff2 /mg.c | |
parent | eee4b3e7bdad6a2c6ef0e7ee1f43200ab0fd25bb (diff) | |
download | perl-326b5008ebd8d91bf6b00d96127d2d711c9f2132.tar.gz |
It's all relative -- better handling of tainted directories
in PATH on VMS (and scrubbing them in t/test.pl).
p4raw-id: //depot/perl@28348
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -1103,10 +1103,20 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) Stat_t st; I32 i; s = delimcpy(tmpbuf, tmpbuf + sizeof tmpbuf, - s, strend, ':', &i); + s, strend, +#ifdef VMS + '|', /* Hmm. How do we get $Config{path_sep} from C? */ +#else + ':', +#endif + &i); s++; if (i >= (I32)sizeof tmpbuf /* too long -- assume the worst */ - || *tmpbuf != '/' +#ifdef VMS + || !strchr(tmpbuf, ':') /* no colon thus no device name -- assume relative path */ +#else + || *tmpbuf != '/' /* no starting slash -- assume relative path */ +#endif || (PerlLIO_stat(tmpbuf, &st) == 0 && (st.st_mode & 2)) ) { MgTAINTEDDIR_on(mg); return 0; |