summaryrefslogtreecommitdiff
path: root/ufs-fsck/pass2.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1996-08-16 14:32:55 +0000
committerThomas Bushnell <thomas@gnu.org>1996-08-16 14:32:55 +0000
commit4b456be5e2685ad949f19f9487a66b7c8bcc1e7f (patch)
tree9a09896f0ebc9c937421cd48b9c4b23151f215e6 /ufs-fsck/pass2.c
parent6554773b4c7c7f4194646aba7e3309e16e8ad022 (diff)
*** empty log message ***
Diffstat (limited to 'ufs-fsck/pass2.c')
-rw-r--r--ufs-fsck/pass2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ufs-fsck/pass2.c b/ufs-fsck/pass2.c
index db63abd7..a2d5996c 100644
--- a/ufs-fsck/pass2.c
+++ b/ufs-fsck/pass2.c
@@ -19,6 +19,7 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "fsck.h"
+#include <assert.h>
/* Verify root inode's allocation and check all directories for
viability. Set DIRSORTED array fully and check to make sure
@@ -307,6 +308,7 @@ pass2 ()
}
bzero (&dino, sizeof (struct dinode));
dino.di_size = dnp->i_isize;
+ assert (dnp->i_numblks <= (NDADDR + NIADDR) * sizeof (daddr_t));
bcopy (dnp->i_blks, dino.di_db, dnp->i_numblks);
datablocks_iterate (&dino, checkdirblock);