1
0
Fork 0

Initialize last byte of command tail.

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3831
This commit is contained in:
ripsaw8080 2013-05-26 01:03:33 +00:00
parent 8e017c87c3
commit f6864ba395

View file

@ -473,7 +473,7 @@ bool DOS_Shell::Execute(char * name,char * args) {
/* Fill the command line */
CommandTail cmdtail;
cmdtail.count = 0;
memset(&cmdtail.buffer,0,126); //Else some part of the string is unitialized (valgrind)
memset(&cmdtail.buffer,0,127); //Else some part of the string is unitialized (valgrind)
if (strlen(line)>126) line[126]=0;
cmdtail.count=(Bit8u)strlen(line);
memcpy(cmdtail.buffer,line,strlen(line));