From: John E. Malmberg Date: Mon, 26 Jun 2006 08:24:57 +0000 (-0400) Subject: [patch@28427] vms.c - null termination of string missing. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ae6d78fe4808b27531735d79233a7a8308309529;p=p5sagit%2Fp5-mst-13.2.git [patch@28427] vms.c - null termination of string missing. From: "John E. Malmberg" Message-ID: <449FD219.5060900@qsl.net> p4raw-id: //depot/perl@28429 --- diff --git a/vms/vms.c b/vms/vms.c index 8a30a55..62b17a0 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -5148,6 +5148,7 @@ static char *mp_do_fileify_dirspec(pTHX_ const char *dir,char *buf,int ts, int * } } } + esa[rms_nam_esll(dirnam)] = '\0'; if (!rms_is_nam_fnb(dirnam, (NAM$M_EXP_DEV | NAM$M_EXP_DIR))) { cp1 = strchr(esa,']'); if (!cp1) cp1 = strchr(esa,'>'); @@ -5170,7 +5171,7 @@ static char *mp_do_fileify_dirspec(pTHX_ const char *dir,char *buf,int ts, int * return NULL; } } - esa[rms_nam_esll(dirnam)] = '\0'; + if (rms_is_nam_fnb(dirnam, NAM$M_EXP_NAME)) { /* They provided at least the name; we added the type, if necessary, */ if (buf) retspec = buf; /* in sys$parse() */