Craig A. Berry [Sat, 11 Mar 2006 01:52:37 +0000 (01:52 +0000)]
p4raw-id: //depot/perl@27467
/* It's either a DCL command or we couldn't find a suitable image */
vmscmd->dsc$w_length = strlen(cmd);
- vmscmd->dsc$a_pointer = PerlMem_malloc(vmscmd->dsc$w_length);
+ vmscmd->dsc$a_pointer = PerlMem_malloc(vmscmd->dsc$w_length + 1);
strncpy(vmscmd->dsc$a_pointer,cmd,vmscmd->dsc$w_length);
- vmscmd->dsc$a_pointer[vmscmd->dsc$w_length];
+ vmscmd->dsc$a_pointer[vmscmd->dsc$w_length] = 0;
PerlMem_free(cmd);