From owner-freebsd-ports Wed Oct 16 20:13:02 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id UAA27894 for ports-outgoing; Wed, 16 Oct 1996 20:13:02 -0700 (PDT) Received: from seagull.rtd.com (root@seagull.rtd.com [198.102.68.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id UAA27881 for ; Wed, 16 Oct 1996 20:12:56 -0700 (PDT) Received: (from dgy@localhost) by seagull.rtd.com (8.7.5/8.7.3) id UAA15775 for freebsd-ports@freefall.cdrom.com; Wed, 16 Oct 1996 20:12:49 -0700 (MST) From: Don Yuniskis Message-Id: <199610170312.UAA15775@seagull.rtd.com> Subject: cnews diffs To: freebsd-ports@freefall.FreeBSD.org (FreeBSD ports) Date: Wed, 16 Oct 1996 20:12:49 -0700 (MST) X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Greetings! The following diffs apply to the patch'ed version of cnews distributed with 2.1R. All pertain to the operation of readnews which, admittedly, is probably rarely used... :> The first hunk fixes (?) the path to mail. The remaining prevent readnews from core-ing in certain degenerate applications. Thanx! --don --------------------8<--------------------8<---------------------- diff -r --context work/readnews/defs.h work.new/readnews/defs.h *** work/readnews/defs.h Wed Sep 7 10:02:34 1994 --- work.new/readnews/defs.h Wed Oct 16 20:03:22 1996 *************** *** 18,24 **** /*#define UNSWMAIL 1*/ /* if you have UNSW "mail" which allows "-s subject -i include_file" arguments */ ! #define MAIL "/bin/mail" #if UNSWMAIL #define FASTMAIL "/bin/mail" #else --- 18,24 ---- /*#define UNSWMAIL 1*/ /* if you have UNSW "mail" which allows "-s subject -i include_file" arguments */ ! #define MAIL "/usr/bin/mail" #if UNSWMAIL #define FASTMAIL "/bin/mail" #else diff -r --context work/readnews/funcs.c work.new/readnews/funcs.c *** work/readnews/funcs.c Thu Sep 8 12:38:24 1994 --- work.new/readnews/funcs.c Wed Oct 16 20:03:58 1996 *************** *** 155,160 **** --- 155,163 ---- register char *n, *s, *nd, *sd; register int rc; + if (nglist == NULL || sublist == NULL) + return 0; + rc = 0; n = nglist; while (*n && rc == 0) { diff -r --context work/readnews/readnews.c work.new/readnews/readnews.c *** work/readnews/readnews.c Thu Apr 27 18:12:21 1995 --- work.new/readnews/readnews.c Wed Oct 16 20:04:36 1996 *************** *** 282,287 **** --- 282,290 ---- { register char *delim; + if (slist == NULL) + return false; + while (*slist) { if (delim = strchr(slist, NGSEPCHAR)) *delim = '\0';