Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ames!vsi1!wyse!mips!dce From: dce@mips.COM (David Elliott) Newsgroups: comp.mail.mh Subject: slocal bug fix Message-ID: <2900@dunkshot.mips.COM> Date: 25 Aug 88 14:53:27 GMT Reply-To: dce@mips.COM (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 24 This subject has been discussed before, and I had a fix for the bug, but was unable to find it because I didn't keep around a copy of the old MH sources. Anyway, the slocal program will dump core on machines that forbid null pointer dereferences, and the problem is that sbr/strindex.c may be given null pointers. This happens on versions 6.3, 6.5, and 6.6. The following, which I have used for 2 years, fixes this: *** strindex.c.orig Thu Aug 25 07:47:36 1988 --- strindex.c Wed Aug 24 15:48:14 1988 *************** *** 7,12 **** --- 7,16 ---- { register char *p; + if (p1 == 0 || p2 == 0) { + return (-1); + } + for (p = p2; *p; p++) if (uprf (p, p1)) return (p - p2);