🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.andrew
Article #2053

Simple fix to core dump bug in AMS

#2053
From: Nathaniel Borenstein
Date: Mon, 12 Feb 1990 15:16
22 lines
1363 bytes
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
Technical Details
Message-ID: <cZphB=q0M2Yt0U4XE=@thumper.bellcore.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!swrinde!ucsd!ucbvax!THUMPER.BELLCORE.COM!nsb

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <cZphB=q0M2Yt0U4XE=@thumper.bellcore.com>
Date: 12 Feb 90 15:16:27 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Organization: The Internet
Lines: 22