Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!ucsd!ucbvax!THUMPER.BELLCORE.COM!nsb From: nsb@THUMPER.BELLCORE.COM (Nathaniel Borenstein) Newsgroups: comp.soft-sys.andrew Subject: Simple fix to core dump bug in AMS Message-ID: Date: 12 Feb 90 15:16:27 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 22 Running on a Sun4 with patchlevel 2 (no, I haven't gotten around to patch 3 yet) and NO AFS, all messagserver clients (cui, messages, vui) will repeatably dump core on zero-length files in a Mailbox directory. The bug is extremely easy to fix. The fix is on line 523 of ams/libs/ms/init.c. The old verison of that line is if (AMS_GecosHacks && ULstrcmp(domain, ThisDomain) == 0) { All you need to do is to make it slightly more robust by adding a couple of null pointer checks, to wit: if (AMS_GecosHacks && domain && ThisDomain && ULstrcmp(domain, ThisDomain) == 0) { (Actually, you could probably get away with checking only "domain", but I figured it couldn't hurt to check ThisDomain while you're at it. This code only runs on zero-length files, so an extra check doesn't cost you anything in the normal case.) This turns out to become relevant once you're serious about a large-scale AMS bboard system without AFS. Cheers. -- Nathaniel