Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!seismo!sundc!pitstop!sun!amdcad!ames!mailrus!cornell!uw-beaver!fluke!battan From: battan@tc.fluke.COM (Jim Battan) Newsgroups: news.software.b Subject: bugfix for inews (control messages cause coredump) Keywords: inews control coredump Message-ID: <5686@fluke.COM> Date: 25 Oct 88 16:27:05 GMT Article-I.D.: fluke.5686 Sender: news@tc.fluke.COM Organization: John Fluke Mfg. Co., Inc., Everett, WA Lines: 34 Recently, I've noticed core dumps being left by inews. I ran it through dbx, and traced it down to being caused by control messages. In control.c, the code for c_cancel() runs through all newsgroups the article was posted to, removing the files. However, once in a blue moon it runs off the end of the string in the history file and indirects through memory location 1, causing a segmentation violation on our Sun. I have no idea why I haven't seen this before; it looks like it should always produce the core dump, but I only have seen it recently. Anyway, here's a patch. Disclaimer: This works for me; your mileage may vary. Index: control.c *** /tmp/,RCSt1a07965 Tue Oct 25 08:43:59 1988 --- control.c Thu Oct 20 12:03:12 1988 *************** *** 704,708 (void) unlink(nfilename); ! p = q+1; } #endif /* !NFSCLIENT */ --- 704,711 ----- (void) unlink(nfilename); ! if (q == NULL) ! break; ! else ! p = q+1; } #endif /* !NFSCLIENT */ -- Jim Battan (+1 206 356 6469) battan@tc.fluke.COM || {sun,uw-beaver,decvax!microsoft}!fluke!battan