From f6864ba395cf8ed293bdc2aad44e40af7409c3ce Mon Sep 17 00:00:00 2001 From: ripsaw8080 Date: Sun, 26 May 2013 01:03:33 +0000 Subject: [PATCH] Initialize last byte of command tail. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3831 --- src/shell/shell_misc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shell/shell_misc.cpp b/src/shell/shell_misc.cpp index e4ebf0d7..136cba43 100644 --- a/src/shell/shell_misc.cpp +++ b/src/shell/shell_misc.cpp @@ -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));