From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e219d94b946dfc26 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!proxad.net!proxad.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Command_Line and wildcards Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <45dcaed8_6@news.bluewin.ch> <1172132169.423514.271890@s48g2000cws.googlegroups.com> <45E1B7AA.30804@obry.net> <1dpvltpykld8r$.1rn2ewhc0itjt$.dlg@40tude.net> Date: Mon, 26 Feb 2007 09:44:16 +0100 Message-ID: <1s55dlqncctpm$.zs9aloiw8j2l$.dlg@40tude.net> NNTP-Posting-Date: 26 Feb 2007 09:44:16 CET NNTP-Posting-Host: 7bb97a41.newsspool1.arcor-online.net X-Trace: DXC=@NWXkI5;]cDoEWD6A4ic==]BZ:af>4Fo<]lROoR1Fl8W>\BH3Y2ONH2D4jXJ08DNcfSJ;bb[5FCTGGVUmh?4LK[5LiR>kg2=2fXn_2mFo9 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:9541 Date: 2007-02-26T09:44:16+01:00 List-Id: On Mon, 26 Feb 2007 05:03:26 GMT, Hyman Rosen wrote: > Dmitry A. Kazakov wrote: >> Get_Line should propagate an exception which could be handled in a >> reasonable way. > > That's not really good enough. That is, your program is to going to > tell you "I can't do that" when you ask "give me the next line". > Fine, you're not crashing, but you really want that line! There are numerous other reasons why Get_Line might fail. So you cannot "really" want it, only conditionally. > There ought to be a Get_Line which returns an Unbounded_String (did > I get that right?), so that space for it comes from the heap instead > of the stack. Which can fail either. Further, why do you presume that heap is larger than stack? AFAIK, nothing in RM requires or implies that. > And yes, I know it's a security issue because someone > can feed the program unbounded input and have it chew up large chunks > of RAM, but sometimes you really do need unbounded lengths on your > input lines. That depends on the underlying OS and its resources sharing schema. Theoretically, it is not the programmer's business, but practically, yes, it is a DoS concern. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de