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.
This commit is contained in:
Xin LI 2008-02-26 03:05:48 +00:00
parent 8f0931174a
commit 33663c7246

View File

@ -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) {