Change 27467 by [EMAIL PROTECTED] on 2006/03/11 01:52:37
null terminate command string -- broken in #27438
Affected files ...
... //depot/perl/vms/vms.c#166 edit
Differences ...
==== //depot/perl/vms/vms.c#166 (text) ====
Index: perl/vms/vms.c
--- perl/vms/vms.c#165~27438~ 2006-03-09 06:49:45.000000000 -0800
+++ perl/vms/vms.c 2006-03-10 17:52:37.000000000 -0800
@@ -8546,9 +8546,9 @@
/* 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);
End of Patch.