X-Authentication-Warning: new-smtp2.ihug.com.au: Host p58-max49.syd.ihug.com.au [203.173.144.122] claimed to be acceleron Message-ID: <001901c11d43$aa03bab0$0a02a8c0@acceleron> From: "Andrew Cottrell" To: , "Peter J. Farley III" Cc: , "Eli Zaretskii" , References: <00cb01c11ccc$ef2fadf0$0a02a8c0 AT acceleron> <00cb01c11ccc$ef2fadf0$0a02a8c0 AT acceleron> <5 DOT 1 DOT 0 DOT 14 DOT 0 DOT 20010804111223 DOT 02918ec0 AT pop DOT dorsai DOT org> Subject: Re: Bash 2.05 buffer overrun problem Date: Sun, 5 Aug 2001 10:14:57 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Reply-To: djgpp-workers AT delorie DOT com > PMFJI here, but on my Win98SE system, this is the response I get from > entering "command /?" on a DOS box (word-wrapped lines were adjusted > manually, sorry if it still wraps when you see it): > > Microsoft(R) Windows 98 > (C)Copyright Microsoft Corp 1981-1999. > > C:\>command /? > Starts a new copy of the Windows Command Interpreter. > > COMMAND [[drive:]path] [device] [/E:nnnnn] [/L:nnnn] [/U:nnn] [/P] > [/MSG] [/LOW] [/Y [/[C|K] command]] > [drive:]path Specifies the directory containing COMMAND.COM. > device Specifies the device to use for command input and output. > /E:nnnnn Sets the initial environment size to nnnnn bytes. > (nnnnn should be between 256 and 32,768). > /L:nnnn Specifies internal buffers length (requires /P as well). > (nnnn should be between 128 and 1,024). > /U:nnn Specifies the input buffer length (requires /P as well). > (nnn should be between 128 and 255). > /P Makes the new Command Interpreter permanent (can't exit). > /MSG Stores all error messages in memory (requires /P as well). > /LOW Forces COMMAND to keep its resident data in low memory. > /Y Steps through the batch program specified by /C or /K. > /C command Executes the specified command and returns. > /K command Executes the specified command and continues running. > > Note that the ENVIRONMENT size (/E:) is allowed to be up to 32768. I > think that is the size you need to allow for. Though personally I've > never used more than 1024, there's no telling what someone else might > choose to use. > > What does "command /?" report on W2K? > Win2K command & cmd output C:\>command /? Starts a new instance of the MS-DOS command interpreter. COMMAND [[drive:]path] [device] [/E:nnnnn] [/P] [/C string] [/MSG] [drive:]path Specifies the directory containing COMMAND.COM file. device Specifies the device to use for command input and output. /E:nnnnn Sets the initial environment size to nnnnn bytes. /P Makes the new command interpreter permanent (can't exit). /C string Carries out the command specified by string, and then stops. /MSG Specifies that all error messages be stored in memory. You need to specify /P with this switch. C:\> C:\>cmd /? Starts a new instance of the Windows 2000 command interpreter CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF] [[/S] [/C | /K] string] /C Carries out the command specified by string and then terminates /K Carries out the command specified by string but remains /S Modifies the treatment of string after /C or /K (see below) /Q Turns echo off /D Disable execution of AutoRun commands from registry (see below) /A Causes the output of internal commands to a pipe or file to be ANSI /U Causes the output of internal commands to a pipe or file to be Unicode /T:fg Sets the foreground/background colors (see COLOR /? for more info) /E:ON Enable command extensions (see below) /E:OFF Disable command extensions (see below) /F:ON Enable file and directory name completion characters (see below) /F:OFF Disable file and directory name completion characters (see below) /V:ON Enable delayed environment variable expansion using c as the delimiter. For example, /V:ON would allow !var! to expand the variable var at execution time. The var syntax expands variables at input time, which is quite a different thing when inside of a FOR loop. /V:OFF Disable delayed environment expansion.