Subject: install(1) dumps core
To: None <netbsd-bugs@netbsd.org>
From: Frank van der Linden <vdlinden@fwi.uva.nl>
List: netbsd-bugs
Date: 12/18/1994 21:52:22
DESCRIPTION:
install dumps core when you execute it without arguments
/*	$NetBSD: xinstall.c,v 1.5 1994/11/14 04:57:19 jtc Exp $	*/

REPEAT BY:

Script started on Sun Dec 18 21:43:40 1994
sheep# install
usage: install [-cs] [-f flags] [-g group] [-m mode] [-o owner] file1 file2
       install [-cs] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory
       install  -d   [-g group] [-m mode] [-o owner] directory ...
usage: install [-cs] [-f flags] [-g group] [-m mode] [-o owner] file1 file2
       install [-cs] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory
       install  -d   [-g group] [-m mode] [-o owner] directory ...
Segmentation fault (core dumped)
sheep# exit

Script done on Sun Dec 18 21:43:44 1994

FIXED BY:

The comment right before usage() says:

/*
 * usage --
 *	print a usage message and die
 */

The die part is absent in usage(). Adding an exit(1) to usage() fixes this.
 
*** /usr/src/usr.bin/xinstall/xinstall.c.orig	Tue Nov 22 00:30:25 1994
--- /usr/src/usr.bin/xinstall/xinstall.c	Sun Dec 18 21:20:56 1994
***************
*** 384,386 ****
--- 384,387 ----
         install [-cs] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory\n\
         install  -d   [-g group] [-m mode] [-o owner] directory ...\n");
+ 	exit(1);
  }

Onno van der Linden        c/o     vdlinden@fwi.uva.nl (Frank van der Linden)