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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e6a2e4a4c0d7d8a6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-25 17:08:31 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: status of PL/I as a viable language Date: Tue, 25 Feb 2003 19:10:34 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3E51908E.9CCA3412@adaworks.com> <8Gh4a.7455$_c6.743959@newsread2.prod.itd.earthlink.net> <3E51ABCE.5491B9A2@adaworks.com> <3E5273DE.2050206@cox.net> <3E531E6F.BDFB2599@adaworks.com> <3E546C45.4010406@cox.net> <3E54F926.441D5BB5@adaworks.com> <1045763933.848350@master.nyc.kbcfp.com> <42EA55F4BE83950E.F1DA277C2FDC157B.C804C1C52FE95D65@lp.airnews.net> <1045769690.126389@master.nyc.kbcfp.com> <2lb33b.7d6.ln@jellix.jlfencey.com> <1045772065.590669@master.nyc.kbcfp.com> <1045839283.86671@master.nyc.kbcfp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:34586 Date: 2003-02-25T19:10:34-06:00 List-Id: Preben Randhol wrote in message ... >Randy Brukardt wrote: >> In order to avoid dynamic allocation of commands, I put the parsed >> commands into a record type with a bunch of statically bounded strings. >> These have to be carefully handled for overflow, and there were a couple >> of obscure cases where I got it wrong. Of course, nothing bad happened, >> I just got a logged Constraint_Error and the command was aborted. (Since >> the problems all came from people trying to break in, I wasn't even >> particularly upset that they weren't served...) > >So in reality it wasn't a buffer overflow as Ada caught it, while if it >had been in C you would have had a buffer overflow and possibly people >breaking in. Did I understand it correctly? Right. I think of "Constraint_Error" being raised as a detected buffer overflow, because it was trying to write outside of a buffer. Of course, its not actually doing any damage. The point, of course, is that I didn't write any code to detect this failure. Indeed, if I had realized where I'd forgotten to protect against buffer overflow, of course I would have fixed it - adding checking code beyond that would be silly. So the "being a great programmer" would not have helped here - I had already tried to detect all of the overflow cases, but I missed a few. That's called being human. Randy. Randy.