Path: utzoo!attcan!uunet!husc6!cmcl2!adm!xadmx!rbj@nav.icst.nbs.gov From: rbj@nav.icst.nbs.gov (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: Re: Implications of recent virus (Trojan Horse) attack Message-ID: <17535@adm.BRL.MIL> Date: 15 Nov 88 18:44:43 GMT Sender: news@adm.BRL.MIL Lines: 24 ? Well, now, gets() is of course unsafe, but then there are ? read(), sprintf(), and no telling how many others. For that ? matter, *p++ = *q++ Not quite in the same way. Read takes an argument which specifys the maximum size of the buffer, no problem. Copying a string (*p++ = *q++), while a frequent source of bugs, is possible to control since strlen will tell you the length. Likewise sprintf; with a little care one can precompute the size and reserve a large enuf area. One problem the latter two have is with segmentation violations. However, with gets(), one is totally at the mercy of data that is outside the program, and thus, not under control. ? haynes@ucscc.ucsc.edu ? haynes@ucscc.bitnet ? ...ucbvax!ucscc!haynes ? "Any clod can have the facts, but having opinions is an Art." ? Charles McCabe, San Francisco Chronicle (Root Boy) Jim Cottrell (301) 975-5688 or Careful with that VAX Eugene! I can't think about that. It doesn't go with HEDGES in the shape of LITTLE LULU -- or ROBOTS making BRICKS...