From 6ed6d775c7365fdb81c3442095a318df5a01ee7e Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 24 Nov 2005 18:16:15 +0000 Subject: [PATCH] Fixing possible stack overflow. (thanks Jochen) Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@2390 --- src/shell/shell_cmds.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/shell_cmds.cpp b/src/shell/shell_cmds.cpp index 8f816242..4e38d0ab 100644 --- a/src/shell/shell_cmds.cpp +++ b/src/shell/shell_cmds.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: shell_cmds.cpp,v 1.59 2005-10-05 08:58:24 qbix79 Exp $ */ +/* $Id: shell_cmds.cpp,v 1.60 2005-11-24 18:16:15 qbix79 Exp $ */ #include #include @@ -518,7 +518,7 @@ void DOS_Shell::CMD_COPY(char * args) { if (DOS_CreateFile(nameTarget,0,&targetHandle)) { // Copy - Bit8u buffer[0x8000]; + static Bit8u buffer[0x8000]; // static, otherwise stack overflow possible. bool failed = false; Bit16u toread = 0x8000; do {