| Article 960 of comp.bugs.4bsd: | |
| Path: | icdoc!doc.ic.ac.uk!zmact61 |
| >From: | zmact61@doc.ic.ac.uk (Diomidis Spinellis) |
| Newsgroups: | comp.bugs.4bsd |
| Subject: | Fsck dumps core |
| Keywords: | fsck core dump |
| Message-ID: | <1552@gould.doc.ic.ac.uk> |
| Date: | 6 Feb 90 12:30:27 GMT |
| Sender: | news@doc.ic.ac.uk |
| Reply-To: | dds@cc.ic.ac.uk (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)
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@cc.ic.ac.uk
Department of Computing BITNET: dds@cc.ic.ac.uk
Imperial College UUCP: ...!cernvax!cc.imperial.ac.uk!dds
London SW7 2BZ JANET: dds@uk.ac.ic.cc
Newsgroup comp.bugs.4bsd contents
Newsgroup list
Diomidis Spinellis home page
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.