NetBSD Problem Report #249

From gnats  Fri May 13 18:46:33 1994
Received: from boombox.apana.org.au (root@boombox.apana.org.au [192.188.107.66]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id SAA00454 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Fri, 13 May 1994 18:46:28 -0700
Message-Id: <199405140051.KAA20418@maenor.apana.org.au>
Date: Sat, 14 May 1994 10:51:29 +1000
From: giles@maenor.apana.org.au (Giles Lean)
Reply-To: giles@maenor.apana.org.au
To: gnats-bugs@sun-lamp.cs.berkeley.edu
Subject: dumpfs can coredump
X-Send-Pr-Version: 3.2

>Number:         249
>Category:       bin
>Synopsis:       dumpfs will core dump with floating point exception
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 13 18:50:15 +0000 1994
>Closed-Date:    Mon Dec 26 14:16:00 +0000 1994
>Last-Modified:  
>Originator:     Giles Lean
>Release:        -current (6th April)
>Organization:
<giles@maenor.apana.org.au>     +61 3 480 2118 (h)
			 	+61 3 272 2519 (w)
>Environment:
Clone 486
System: NetBSD maenor.apana.org.au 0.9a MAENOR#2 i386


>Description:
	The dumpfs program makes no attempt to ensure that it has
	a valid filesystem before calculating values, leading to
	division by zero.
>How-To-Repeat:
	Run dumpfs on a swap partition
>Fix:
*** /usr/src/sbin/dumpfs/dumpfs.c	Fri Dec 17 17:35:07 1993
--- ./dumpfs.c	Sat May 14 10:32:57 1994
***************
*** 101,106 ****
--- 101,112 ----
  		perror(name);
  		return;
  	}
+ 	if (afs.fs_magic != FS_MAGIC) {
+ 		fprintf(stderr,
+ 		    "dumpfs: %s: superblock magic number 0x%x, not 0x%x.\n",
+ 			name, afs.fs_magic, FS_MAGIC);
+ 		return;
+ 	}
  	if (afs.fs_postblformat == FS_42POSTBLFMT)
  		afs.fs_nrpos = 8;
  	dev_bsize = afs.fs_fsize / fsbtodb(&afs, 1);
>Release-Note:
>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: glass
State-Changed-When: Mon Dec 26 14:16:00 1994
State-Changed-Why:
fixed.  fix forwarded to CSRG.
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.