Subject: bin/29290: cpio with `--foo' unknown long option cause SIGSEGV
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <tnozaki@NetBSD.org>
List: netbsd-bugs
Date: 02/08/2005 15:47:01
>Number:         29290
>Category:       bin
>Synopsis:       cpio with `--foo' unknown long option cause SIGSEGV
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 08 15:47:01 +0000 2005
>Originator:     Takehiko NOZAKI
>Release:        2.99.15
>Organization:
>Environment:
NetBSD fly.example.jp 2.99.15 NetBSD 2.99.15 (FLY) #0: Sun Feb  6 18:11:25 JST 2005  tnozaki AT fly.example.jp:/usr/src/sys/arch/i386/compile/FLY i386
>Description:
cpio with `--foo' unknown long option cause SIGSEGV.
see fix section.
>How-To-Repeat:
run
$ cpio --foo

>Fix:
Index: options.c
===================================================================
RCS file: /home/cvs/NetBSD/src/bin/pax/options.c,v
retrieving revision 1.82
diff -u -r1.82 options.c
--- options.c	26 Oct 2004 16:11:49 -0000	1.82
+++ options.c	8 Feb 2005 15:18:34 -0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: options.c,v 1.81 2004/10/22 21:00:18 jmc Exp $	*/
+/*	$NetBSD: options.c,v 1.82 2004/10/26 16:11:49 tron Exp $	*/
 
 /*-
  * Copyright (c) 1992 Keith Muller.
@@ -42,7 +42,7 @@
 #if 0
 static char sccsid[] = "@(#)options.c	8.2 (Berkeley) 4/18/94";
 #else
-__RCSID("$NetBSD: options.c,v 1.81 2004/10/22 21:00:18 jmc Exp $");
+__RCSID("$NetBSD: options.c,v 1.82 2004/10/26 16:11:49 tron Exp $");
 #endif
 #endif /* not lint */
 
@@ -1378,6 +1378,7 @@
 	{ "version",		no_argument,		0,
 						OPT_VERSION },
 #endif
+	{ 0,			0,			0,	0 },
 };
 
 /*