home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: alt.folklore.computers
- Path: sparky!uunet!math.fu-berlin.de!Sirius.dfn.de!tubsibr!pvs9
- From: pvs9@ibr.cs.tu-bs.de (Praktikum Verteilte Systeme)
- Subject: Re: Re:Re:help friendly alien...
- Message-ID: <1992Nov23.135859.26478@ibr.cs.tu-bs.de>
- Originator: pvs9@eris.ibr.cs.tu-bs.de
- Sender: postnntp@ibr.cs.tu-bs.de (nntp inews entry)
- Reply-To: pvs9@ibr.cs.tu-bs.de (Praktikum Verteilte Systeme)
- Organization: TU Braunschweig, Informatik (Bueltenweg), Germany
- Date: Mon, 23 Nov 1992 13:58:59 GMT
- Lines: 43
-
-
- In article <1992Nov20.191739.3728@osf.org>, dbrooks@osf.org (David Brooks)
- writes :
-
- [insignificant stuff deleted]
-
- }|>
- }|> ->Xandribuuu = (Rtoff*)malloc(sizeof(h_andrx));
- }
- }If I were you (which I'm not, having an invalid arm count), I wouldn't
- }trust flight-critical software that doesn't test the return value from
- }malloc. Just a minute...
- }
- }|> jogg = (GnoBr (xuuuuuuuu, U_XXilef (_Xanshbr_tvn))?xuuuuuuuu->Zu
- }:0);
- }|> xuuuuuuuu->_nHung.MxT->rt->Z_7->__0b->XanBr_->iu[0] = (jogg%37);
- }|> xuuuuuuuu->Shra = Ndelsef (v_78_K);
- }|> return xuuuuuuuu;
- }
- }Unles you can prove it is checked after returning from all calls to this
- }procedure.
- }--
- }David Brooks dbrooks@osf.org
- }Open Software Foundation uunet!osf.org!dbrooks
- }All|berall und ewig blauen licht die Fernen! Ewig... ewig... earwig...
- }O!
- }
-
- You're bloody right ! That piece of code is really distrustful. When I owned
- one of these spaceship, I did not only correct the error in the procedure,
- but also built in security checks, in this case I changed the malloc line
- into :
-
- pt = (Rtoff*)malloc(sizeof(h_andrx));
- if (pt==NULL) fatal_error (387);
- xuuuuuuuu->...->Xandribuu = pt;
-
- Yes, there is *NO* sufficient error detection and treatment in the z-9999q's
- software originally, I had to do it on myself ! And if I hadn't done it, I
- wouldn't sit here alive writing these lines.
-
- May the SCHWARTZ never leave you alone !
-
-