Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site gcc-milo.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!gcc-milo!brad From: brad@gcc-milo.ARPA (Brad Parker) Newsgroups: net.news.adm Subject: bug in header.c? Message-ID: <496@gcc-milo.ARPA> Date: Sun, 30-Mar-86 22:44:09 EST Article-I.D.: gcc-milo.496 Posted: Sun Mar 30 22:44:09 1986 Date-Received: Thu, 3-Apr-86 04:41:59 EST Reply-To: brad@gcc-milo.UUCP (Brad Parker) Organization: General Computer Company, Cambridge Ma Lines: 39 References: During a marathon port session of rnews code (don't ask), I discovered that "getfield" in header.c does a (looks like) bad thing. If I'm not mistaken, several of the fields filled in by getfield are not "BUFLEN" length (they are shorter). code fragment: getfield(hpfield) char *hpfield; { ... if (*ptr != '\0') { strncpy(hpfield, ptr, BUFLEN); nstrip(hpfield); } ... } I changed the "strncpy" to a "strcpy" and it seems to work. Why use "strncpy"? Are we worried about binary in the news lines? (seems unlikely). "nstrip" does nice things to the ascii anyway. -If this is fixed in 2.10.3, then "never mind". If not, consider this a bug report. ps: I think there should be more #ifdefs in the news code. (non-news people: this is a MAJOR news subcult oriented joke. All news hackers should be laughing on the floor at this point ;-) ) -brad -- J Bradford Parker General Computer (HyperDrive Beach) harvard!gcc-milo!brad "She said, 'Just drive.'" -heard on the radio.