diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-08-01 13:58:04 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-08-01 13:58:04 +0000 |
commit | b8ffc8df1a4e893e9c7d77b64a6fae8af5801974 (patch) | |
tree | 664b3279897c4f1ff6dafd1f0bcd75de34f68ed1 /mg.c | |
parent | 4d0523d6c78866412e93a18e8d5034cac4b49d90 (diff) | |
download | perl-b8ffc8df1a4e893e9c7d77b64a6fae8af5801974.tar.gz |
Various patches by John E. Malmberg to fix data
corruption issues on VMS. Back out change 25218 and
the parts of change 25217 that affect pp_ctl.c and
pp_sys.c.
p4raw-id: //depot/perl@25257
Diffstat (limited to 'mg.c')
-rw-r--r-- | mg.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1045,10 +1045,13 @@ Perl_magic_setenv(pTHX_ SV *sv, MAGIC *mg) MgTAINTEDDIR_off(mg); #ifdef VMS if (s && klen == 8 && strEQ(ptr, "DCL$PATH")) { - char pathbuf[256], eltbuf[256], *cp, *elt = (char *) s; + char pathbuf[256], eltbuf[256], *cp, *elt; Stat_t sbuf; int i = 0, j = 0; + strncpy(eltbuf, s, 255); + eltbuf[255] = 0; + elt = eltbuf; do { /* DCL$PATH may be a search list */ while (1) { /* as may dev portion of any element */ if ( ((cp = strchr(elt,'[')) || (cp = strchr(elt,'<'))) ) { |