Fsck dumps core
Diomidis Spinellis
zmact61 at doc.ic.ac.uk
Tue Feb 6 23:30:27 AEST 1990
Index: etc/fsck/pass1.c 4.3BSD (including Tahoe)
Description:
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.
Repeat-By:
Some probably rare combination of disk configuration, paritioning
and disk inconsistencies.
Fix:
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 ****
pass1()
{
! register int c, i, j;
register DINODE *dp;
struct zlncnt *zlnp;
int ndb, cgd;
--- 25,31 ----
pass1()
{
! register unsigned int c, i, j;
register DINODE *dp;
struct zlncnt *zlnp;
int ndb, cgd;
--
Diomidis Spinellis Internet: dds at cc.ic.ac.uk
Department of Computing BITNET: dds at cc.ic.ac.uk
Imperial College UUCP: ...!cernvax!cc.imperial.ac.uk!dds
London SW7 2BZ JANET: dds at uk.ac.ic.cc
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list