Path: utzoo!attcan!uunet!unisoft!mtxinu!sybase!edward From: edward@vangogh.sybase.com (Ed Hirgelt) Newsgroups: comp.mail.mh Subject: Re: questions about slocal Message-ID: Date: 9 Dec 88 17:57:29 GMT References: <78@adobe.COM> Sender: news@sybase.sybase.com Organization: Sybase, Inc. Lines: 38 In-reply-to: shore@adobe.com's message of 7 Dec 88 23:39:46 GMT I've been using slocal for several months with 6.5. I made one change to sbr/getcpy.c to avoid dereferencing the null pointer. The code now looks like: /* getcpy.c - copy a string in managed memory */ #include "../h/mh.h" #include char *getcpy (str) register char *str; { register char *cp; if( str == NULL ) str = ""; if ((cp = malloc ((unsigned) (strlen (str) + 1))) == NULL) adios (NULLCP, "unable to allocate string storage"); (void) strcpy (cp, str); return cp; } The new code is the test for str being null and setting it to the empty string. It gets rid of the crash although it may ignore other problems. I've had no problem slocal since. Good luck... Ed -- --------------------------------------------------- Ed Hirgelt sun!sybase!edward Sybase, Inc. 6475 Christie Ave Emeryville, Ca. 94608