Newsgroup: comp.bugs.4bsd

Article 960 of comp.bugs.4bsd:
Path: icdoc!!zmact61
>From: (Diomidis Spinellis)
Newsgroups: comp.bugs.4bsd
Subject: Fsck dumps core
Keywords: fsck core dump
Message-ID: <>
Date: 6 Feb 90 12:30:27 GMT
Reply-To: (Diomidis Spinellis)
Distribution: world
Organization: Department of Computing, Imperial College, London, UK
Lines: 42
Content-Length: 1277
Index:	etc/fsck/pass1.c 4.3BSD (including Tahoe)

	Fsck dumps core.  An integer variable, (j in function pass1)
	can exceed 2^31.  When j is used to index dp->di_db[] it gives
	a negative offset which results in an incorrect address.

	Some probably rare combination of disk configuration, paritioning 
	and disk inconsistencies.

	Change "etc/fsck/pass1.c" by applying the following patch.  A 
	thorough general cleanup to remove type inconsistencies between 
	daddr_t, long and unsigned int is needed, but it looks like a lot 
	of work.

*** pass1.c.orig	Tue Feb  6 11:42:59 1990
--- pass1.c	Tue Feb  6 11:41:57 1990
*** 25,31 ****
! 	register int c, i, j;
  	register DINODE *dp;
  	struct zlncnt *zlnp;
  	int ndb, cgd;
--- 25,31 ----
! 	register unsigned int c, i, j;
  	register DINODE *dp;
  	struct zlncnt *zlnp;
  	int ndb, cgd;

Diomidis Spinellis                  Internet:       
Department of Computing             BITNET:         
Imperial College                    UUCP:   ...!cernvax!!dds
London SW7 2BZ                      JANET:          

Newsgroup comp.bugs.4bsd contents
Newsgroup list
Diomidis Spinellis home page

Creative Commons License Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.