diff options
author | delphij <delphij@FreeBSD.org> | 2008-02-26 03:05:48 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2008-02-26 03:05:48 +0000 |
commit | db686b518eda3e59a2fb94866f837386fbabca9d (patch) | |
tree | 6e5dc92f361ed978db4a0892ae1c7bc9e803875a /sbin/fsck_ffs | |
parent | 8363f7e2b231e42721459e96f229699391b0dd94 (diff) | |
download | FreeBSD-src-db686b518eda3e59a2fb94866f837386fbabca9d.zip FreeBSD-src-db686b518eda3e59a2fb94866f837386fbabca9d.tar.gz |
In pass2check(): Be more strict with the inode information before further
processing the information. chk1 is more prone to crash when insane
information is provided by the on-disk inode, and does not even work
if the inode is being smarshed badly.
Diffstat (limited to 'sbin/fsck_ffs')
-rw-r--r-- | sbin/fsck_ffs/pass2.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/fsck_ffs/pass2.c b/sbin/fsck_ffs/pass2.c index c4fdd2a..59a7a84 100644 --- a/sbin/fsck_ffs/pass2.c +++ b/sbin/fsck_ffs/pass2.c @@ -242,6 +242,8 @@ pass2check(struct inodesc *idesc) /* * check for "." */ + if (dirp->d_ino > maxino) + goto chk2; if (idesc->id_entryno != 0) goto chk1; if (dirp->d_ino != 0 && strcmp(dirp->d_name, ".") == 0) { |