From owner-freebsd-bugs Wed Mar 22 23:57:16 1995 Return-Path: bugs-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id XAA03401 for bugs-outgoing; Wed, 22 Mar 1995 23:57:16 -0800 Received: from ghpc6.ihf.rwth-aachen.de (ghpc6.ihf.RWTH-Aachen.DE [134.130.90.6]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id XAA03393 for ; Wed, 22 Mar 1995 23:57:11 -0800 Received: (from thomas@localhost) by ghpc6.ihf.rwth-aachen.de (8.6.8/8.6.6) id JAA02166 for bugs@freebsd.org; Thu, 23 Mar 1995 09:36:16 +0100 From: Thomas Gellekum Message-Id: <199503230836.JAA02166@ghpc6.ihf.rwth-aachen.de> Subject: diffs for boggle To: bugs@FreeBSD.org Date: Thu, 23 Mar 1995 09:36:15 +0100 (MET) Organization: Institut f. Hochfrequenztechnik, RWTH Aachen X-Mailer: ELM [version 2.4 PL23] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1947 Sender: bugs-owner@FreeBSD.org Precedence: bulk Moin moin, looks like strcmp() and strlen() don't like NULL's as arguments. The attached diffs should be applied in /usr/src/games/boggle/boggle. tg diff -c /usr/src/games/boggle/boggle/bog.c ./bog.c *** /usr/src/games/boggle/boggle/bog.c Sun Sep 4 06:02:31 1994 --- ./bog.c Wed Mar 22 16:10:46 1995 *************** *** 119,125 **** int argc; char *argv[]; { ! long seed; int ch, done, i, selfuse, sflag; char *bspec, *p; --- 119,125 ---- int argc; char *argv[]; { ! long seed = 0; int ch, done, i, selfuse, sflag; char *bspec, *p; *************** *** 155,174 **** argc -= optind; argv += optind; ! if (strcmp(argv[0], "+") == 0) ! reuse = 1; ! else if (strcmp(argv[0], "++") == 0) ! selfuse = 1; ! else if (islower(argv[0][0])) { ! if (strlen(argv[0]) != 16) { ! usage(); ! ! /* This board is assumed to be valid... */ ! bspec = argv[0]; ! } else ! usage(); ! } if (batch && bspec == NULL) errx(1, "must give both -b and a board setup"); --- 155,175 ---- argc -= optind; argv += optind; ! if (argv[0]) { /* any args left? */ ! if (strcmp(argv[0], "+") == 0) ! reuse = 1; ! else if (strcmp(argv[0], "++") == 0) ! selfuse = 1; ! else if (islower(argv[0][0])) { ! if (strlen(argv[0]) != 16) { ! usage(); + } else + /* This board is assumed to be valid... */ + bspec = argv[0]; + } + } + if (batch && bspec == NULL) errx(1, "must give both -b and a board setup"); diff -c /usr/src/games/boggle/boggle/timer.c ./timer.c *** /usr/src/games/boggle/boggle/timer.c Sun Sep 4 06:02:31 1994 --- ./timer.c Wed Mar 22 14:20:51 1995 *************** *** 45,50 **** --- 45,51 ---- #include #include #include + #include #include "bog.h" #include "extern.h"