From cy@cschuber.net.gov.bc.ca Sat Jun 19 01:06:04 1999
Return-Path: <cy@cschuber.net.gov.bc.ca>
Received: from point.osg.gov.bc.ca (point.osg.gov.bc.ca [142.32.102.44])
	by hub.freebsd.org (Postfix) with ESMTP id C6CED153D2
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jun 1999 01:05:05 -0700 (PDT)
	(envelope-from cy@cschuber.net.gov.bc.ca)
Received: (from daemon@localhost)
	by point.osg.gov.bc.ca (8.8.7/8.8.8) id BAA02523
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 19 Jun 1999 01:05:05 -0700
Received: from cschuber.net.gov.bc.ca(142.31.240.113), claiming to be "cwsys.cwsent.com"
 via SMTP by point.osg.gov.bc.ca, id smtpda02521; Sat Jun 19 01:05:02 1999
Received: (from cy@localhost)
	by cwsys.cwsent.com (8.9.3/8.9.1) id WAA01064;
	Fri, 18 Jun 1999 22:58:55 -0700 (PDT)
Message-Id: <199906190558.WAA01064@cwsys.cwsent.com>
Date: Fri, 18 Jun 1999 22:58:55 -0700 (PDT)
From: Cy Schubert <cy@cschuber.net.gov.bc.ca>
Reply-To: cschuber@uumail.gov.bc.ca
To: FreeBSD-gnats-submit@freebsd.org
Subject: newfs segfault
X-Send-Pr-Version: 3.2

>Number:         12292
>Category:       bin
>Synopsis:       newfs segfaults in strtol.c(68), atoi.c(45), newfs.c(360)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jun 19 01:10:01 PDT 1999
>Closed-Date:    Sat Jun 19 07:36:43 PDT 1999
>Last-Modified:  Sat Jun 19 07:37:33 PDT 1999
>Originator:     Cy Schubert
>Release:        FreeBSD 3.2-RELEASE i386
>Organization:
ITSD Province of BC
>Environment:

	FreeBSD cwsys 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Tue Jun  1 23:15:34 PDT 1999     root@cwsys:/opt2/cvs-320/src/sys/compile/CWSYS  i386

>Description:

	Core was generated by `newfs'.
	Program terminated with signal 11, Segmentation fault.
	#0  0x80528bc in strtol ()
	(gdb) bt
	#0  0x80528bc in strtol ()
	#1  0x80526b7 in atoi ()
	#2  0x804883f in main (argc=18, argv=0xbfbfdaf8) at newfs.c:360
	#3  0x80480e9 in _start ()

	Problem introduced in version 1.24 of newfs.c.

>How-To-Repeat:

	Invoke newfs with the -x flag.

>Fix:
	

--- src/sbin/newfs/newfs.c.orig	Sat Oct 17 01:03:52 1998
+++ src/sbin/newfs/newfs.c	Fri Jun 18 22:43:33 1999
@@ -247,7 +247,7 @@
 
 	opstring = mfs ?
 	    "NF:T:a:b:c:d:e:f:i:m:o:s:" :
-	    "NOS:T:a:b:c:d:e:f:i:k:l:m:n:o:p:r:s:t:u:vx";
+	    "NOS:T:a:b:c:d:e:f:i:k:l:m:n:o:p:r:s:t:u:vx:";
 	while ((ch = getopt(argc, argv, opstring)) != -1)
 		switch (ch) {
 		case 'N':

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: n_hibma 
State-Changed-When: Sat Jun 19 07:36:43 PDT 1999 
State-Changed-Why:  
Fixed (in CURRENT, 3.2 will follow swift). Thanks! 
>Unformatted:
