X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f Date: Thu, 28 Feb 2002 17:33:48 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: djgpp AT delorie DOT com Subject: Re: dxegen goes boom. is there a fix? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On 28 Feb 2002, Martin Stromberg wrote: > There's a bug (mildly speaking): > Lines 89-91 and 115-119 of dxegen.c: > if (fh.f_nscns != 1 || argc > 4) > { > char command[1024], *libdir; > ... > > for(i=3;argv[i];i++) > { > strcat(command, argv[i]); > strcat(command, " "); > } > > This will blow up when the command line becomes bigger than 1024. Thanks. The moral of today's lesson: never put any arbitrary limits into your program, 'cause one day they will be overrun.