diff options
author | Craig A. Berry <craigberry@mac.com> | 2005-10-14 15:31:33 +0000 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2005-10-14 15:31:33 +0000 |
commit | 23e68951924551498fcbd4c960cbe751e5dd9ccf (patch) | |
tree | 679e3c391fc90dc59f623c7bcabbe5896b7118cc /vms | |
parent | 6f5df6bcff836592955f41c957bc7bb3d96c0087 (diff) | |
download | perl-23e68951924551498fcbd4c960cbe751e5dd9ccf.tar.gz |
Grab enough room from the outset in do_tovmsspec()
p4raw-id: //depot/perl@25759
Diffstat (limited to 'vms')
-rw-r--r-- | vms/vms.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -4370,7 +4370,7 @@ static char *mp_do_tovmsspec(pTHX_ const char *path, char *buf, int ts) { if (path == NULL) return NULL; if (buf) rslt = buf; - else if (ts) Newx(rslt,strlen(path)+9,char); + else if (ts) Newx(rslt,NAM$C_MAXRSS+1,char); else rslt = __tovmsspec_retbuf; if (strpbrk(path,"]:>") || (dirend = strrchr(path,'/')) == NULL) { @@ -4402,7 +4402,6 @@ static char *mp_do_tovmsspec(pTHX_ const char *path, char *buf, int ts) { while (*(cp2+1) == '/') cp2++; /* Skip multiple /s */ if (!*(cp2+1)) { - if (!buf & ts) Renew(rslt,18,char); if (decc_disable_posix_root) { strcpy(rslt,"sys$disk:[000000]"); } |