Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watmath.UUCP Path: utzoo!watmath!jmsellens From: jmsellens@watmath.UUCP (John M Sellens) Newsgroups: net.news.b,net.sources.bugs Subject: Fix to 2.10.2 postnews Subject: line bug Message-ID: <10987@watmath.UUCP> Date: Fri, 18-Jan-85 07:42:36 EST Article-I.D.: watmath.10987 Posted: Fri Jan 18 07:42:36 1985 Date-Received: Fri, 18-Jan-85 10:29:27 EST Distribution: net Organization: U of Waterloo, Ontario Lines: 54 Xref: watmath net.news.b:1053 net.sources.bugs:188 When postnews rotates an offensive joke it mangles the header. The reason is that the same buffer is used for two different strings. The following simple fix to postnews will make your joke Subject: lines look like > Subject: Original subject - offensive to something (ROT13) instead of > Subject: Original subjectSubject: Original subject *** old.postnews.c Fri Jan 18 07:35:06 1985 --- postnews.c Fri Jan 18 07:34:38 1985 *************** *** 341,346 if (ngmatch(newsgroups, "all.jokes")) { if (askyes("Could this be offensive to anyone? ","")) { getpr("Whom might it offend? ", group); sprintf(buf," - offensive to %s (ROT13)",group); modify_article(tempfname, "Subject: ", buf, "append"); --- 341,347 ----- if (ngmatch(newsgroups, "all.jokes")) { if (askyes("Could this be offensive to anyone? ","")) { + char jbuf[BUFLEN]; getpr("Whom might it offend? ", group); sprintf(jbuf," - offensive to %s (ROT13)",group); modify_article(tempfname, "Subject: ", jbuf, "append"); *************** *** 342,349 if (ngmatch(newsgroups, "all.jokes")) { if (askyes("Could this be offensive to anyone? ","")) { getpr("Whom might it offend? ", group); ! sprintf(buf," - offensive to %s (ROT13)",group); ! modify_article(tempfname, "Subject: ", buf, "append"); encode(tempfname); } } --- 343,350 ----- if (askyes("Could this be offensive to anyone? ","")) { char jbuf[BUFLEN]; getpr("Whom might it offend? ", group); ! sprintf(jbuf," - offensive to %s (ROT13)",group); ! modify_article(tempfname, "Subject: ", jbuf, "append"); encode(tempfname); } } ---- John M Sellens UUCP: {decvax|utzoo|ihnp4|allegra|clyde}!watmath!jmsellens CSNET: jmsellens%watmath@waterloo.csnet ARPA: jmsellens%watmath%waterloo.csnet@csnet-relay.arpa