summaryrefslogtreecommitdiff
path: root/vms/vms.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2009-01-09 12:51:31 -0600
committerCraig A. Berry <craigberry@mac.com>2009-01-09 12:51:31 -0600
commitb8486b9d23e91feb9cbf1c92c469f57fe551c78f (patch)
treec33cd0282004ed59ac4696b4249f290890bf779b /vms/vms.c
parent9948897efc093634ae400ccfcea5e013a2ae63d3 (diff)
downloadperl-b8486b9d23e91feb9cbf1c92c469f57fe551c78f.tar.gz
simple_trnlnm needs an actual length as its last argument.
Plus the length of sys$posix_root was miscalculated. Plus an argument reversal when translating the TMP logical.
Diffstat (limited to 'vms/vms.c')
-rw-r--r--vms/vms.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/vms/vms.c b/vms/vms.c
index 32a40af7de..52e2be8dcc 100644
--- a/vms/vms.c
+++ b/vms/vms.c
@@ -5874,7 +5874,7 @@ static char *mp_do_fileify_dirspec(pTHX_ const char *dir,char *buf,int ts, int *
(!decc_posix_compliant_pathnames && decc_disable_posix_root)) {
strcpy(trndir,*dir == '/' ? dir + 1: dir);
trnlnm_iter_count = 0;
- while (!strpbrk(trndir,"/]>:") && simple_trnlnm(trndir,trndir,0)) {
+ while (!strpbrk(trndir,"/]>:") && simple_trnlnm(trndir,trndir,VMS_MAXRSS-1)) {
trnlnm_iter_count++;
if (trnlnm_iter_count >= PERL_LNM_MAX_ITER) break;
}
@@ -6367,7 +6367,7 @@ static char *mp_do_pathify_dirspec(pTHX_ const char *dir,char *buf, int ts, int
trnlnm_iter_count = 0;
while (!strpbrk(trndir,"/]:>") && !no_translate_barewords
- && simple_trnlnm(trndir,trndir,0)) {
+ && simple_trnlnm(trndir,trndir,VMS_MAXRSS-1)) {
trnlnm_iter_count++;
if (trnlnm_iter_count >= PERL_LNM_MAX_ITER) break;
trnlen = strlen(trndir);
@@ -6778,7 +6778,7 @@ static char *mp_do_tounixspec(pTHX_ const char *spec, char *buf, int ts, int * u
if (cmp_rslt == 0) {
int islnm;
- islnm = simple_trnlnm(tmp, "TMP", 0);
+ islnm = simple_trnlnm("TMP", tmp, VMS_MAXRSS-1);
if (!islnm) {
strcpy(rslt, "/tmp");
cp1 = cp1 + 4;
@@ -8090,7 +8090,7 @@ static char *mp_do_tovmsspec
*cp1 = '\0';
trndev = PerlMem_malloc(VMS_MAXRSS);
if (trndev == NULL) _ckvmssts_noperl(SS$_INSFMEM);
- islnm = simple_trnlnm(rslt,trndev,0);
+ islnm = simple_trnlnm(rslt,trndev,VMS_MAXRSS-1);
/* DECC special handling */
if (!islnm) {
@@ -8098,21 +8098,21 @@ static char *mp_do_tovmsspec
strcpy(rslt,"sys$system");
cp1 = rslt + 10;
*cp1 = 0;
- islnm = simple_trnlnm(rslt,trndev,0);
+ islnm = simple_trnlnm(rslt,trndev,VMS_MAXRSS-1);
}
else if (strcmp(rslt,"tmp") == 0) {
strcpy(rslt,"sys$scratch");
cp1 = rslt + 11;
*cp1 = 0;
- islnm = simple_trnlnm(rslt,trndev,0);
+ islnm = simple_trnlnm(rslt,trndev,VMS_MAXRSS-1);
}
else if (!decc_disable_posix_root) {
strcpy(rslt, "sys$posix_root");
- cp1 = rslt + 13;
+ cp1 = rslt + 14;
*cp1 = 0;
cp2 = path;
while (*(cp2+1) == '/') cp2++; /* Skip multiple /s */
- islnm = simple_trnlnm(rslt,trndev,0);
+ islnm = simple_trnlnm(rslt,trndev,VMS_MAXRSS-1);
}
else if (strcmp(rslt,"dev") == 0) {
if (strncmp(cp2,"/null", 5) == 0) {
@@ -8121,7 +8121,7 @@ static char *mp_do_tovmsspec
cp1 = rslt + 4;
*cp1 = 0;
cp2 = cp2 + 5;
- islnm = simple_trnlnm(rslt,trndev,0);
+ islnm = simple_trnlnm(rslt,trndev,VMS_MAXRSS-1);
}
}
}