From: John E. Malmberg Date: Mon, 2 Jan 2006 14:05:43 +0000 (-0500) Subject: patch@26561 & earlier - buffer overrun in VMS.C X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bbdb6c9ad82eade42e29725b24ecabf73dd608fb;p=p5sagit%2Fp5-mst-13.2.git patch@26561 & earlier - buffer overrun in VMS.C From: "John E. Malmberg" Message-id: <43B97987.70201@qsl.net> p4raw-id: //depot/perl@26581 --- diff --git a/vms/vms.c b/vms/vms.c index a914506..ac47224 100644 --- a/vms/vms.c +++ b/vms/vms.c @@ -4830,7 +4830,7 @@ static char *mp_do_fileify_dirspec(pTHX_ const char *dir,char *buf,int ts) else retspec = __fileify_retbuf; cp1 = esa; cp2 = retspec; - while (*cp1 != ':') *(cp2++) = *(cp1++); + while ((*cp1 != ':') && (*cp1 != '\0')) *(cp2++) = *(cp1++); strcpy(cp2,":[000000]"); cp1 += 2; strcpy(cp2+9,cp1);