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-Thread: 103376,839916f6ca3b6404 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder1-2.proxad.net!proxad.net!feeder2-2.proxad.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 05 Mar 2009 15:24:38 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: not null References: <49ae93bc$0$31872$9b4e6d93@newsspool3.arcor-online.net> <49ae9cc4$0$31877$9b4e6d93@newsspool3.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <49afe0a7$0$31878$9b4e6d93@newsspool3.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 05 Mar 2009 15:24:39 CET NNTP-Posting-Host: 8404fe04.newsspool3.arcor-online.net X-Trace: DXC=m@\K_a7STfo<6cDJZfMd_cMcF=Q^Z^V3h4Fo<]lROoRa^YC2XCjHcbil@HmXNX?_Gd;9OJDO8_SKfNSZ1n^B98ijAPTB:mb1JCl X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:4939 Date: 2009-03-05T15:24:39+01:00 List-Id: Adam Beneschan schrieb: > On Mar 4, 7:22 am, Georg Bauhaus > wrote: > >> The overall impact of refs not "attached" (to use >> an Eiffel term; not null is spreading through languages >> it seems; C++, too?) is a financial disaster, with >> possibly one exception: there is money in a business >> selling software components whose purpose is to guard >> the holes kept open by operating system sellers. >> >> (Antivirus etc.) > > Is there any basis for this last comment? I've seen lots of reports > of vulnerabilities caused by buffer overflows combined with lack of > range checking, and by double-deallocation errors (deallocating the > same chunk of memory twice and making hash of your heap structures), > but I don't recall seeing any caused by null references. Errors > involving null references seem a lot more likely just to make programs > die unexpectedly, than to allow arbitrary code execution or the like. You have caught me in an argument over CeBIT discussions concerning the security of OSs and server software, so I might have been carried away. OTOH, the very presence of null values seems close to the causes of buffer overflow, of accessing/overwriting data off bounds, etc. This is simply because NULL (similarly, '\0') is thought of as a regular thing, for the programmer to handle routinely with any sequential piece of data. strcat(3) and relatives, as its counterparts at the end of arrays of structures, rely on null values. You need the dangerous thing to get anything done. Caveat emptor.