Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!uflorida!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.wizards Subject: Re: Referencing NULL pointers Message-ID: <10515@smoke.BRL.MIL> Date: 11 Jul 89 00:53:38 GMT References: <19367@paris.ics.uci.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 11 In article <19367@paris.ics.uci.edu> T.S. Hadley writes: > Apparantly, on other machines this is perfectly valid, since I see > quite a lot of this in code created on certain non-sun machines. No, dereferencing via a null pointer is never valid in C. It happened that one could get away with it under certain circumstances using certain C implementations (e.g. some a.out types on 4BSD on a VAX). That unfortunately delayed detection of such bugs until such time as the programs were ported to systems where null pointer dereferencing was not "benign". By now, recent versions of UNIX should have found and fixed the vast majority of such bugs.