Module Name:    src
Committed By:   jdolecek
Date:           Mon Aug 15 18:57:07 UTC 2016

Modified Files:
        src/sbin/fsck_ext2fs: setup.c

Log Message:
adjust inode size check to compare against EXT2_REV0_DINODE_SIZE, rather then 
sizeof(struct ext2fs_dinode), as the structure definition was expanded with the 
optional fields


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sbin/fsck_ext2fs/setup.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/fsck_ext2fs/setup.c
diff -u src/sbin/fsck_ext2fs/setup.c:1.33 src/sbin/fsck_ext2fs/setup.c:1.34
--- src/sbin/fsck_ext2fs/setup.c:1.33	Mon Aug 15 18:42:15 2016
+++ src/sbin/fsck_ext2fs/setup.c	Mon Aug 15 18:57:06 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: setup.c,v 1.33 2016/08/15 18:42:15 jdolecek Exp $	*/
+/*	$NetBSD: setup.c,v 1.34 2016/08/15 18:57:06 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -58,7 +58,7 @@
 #if 0
 static char sccsid[] = "@(#)setup.c	8.5 (Berkeley) 11/23/94";
 #else
-__RCSID("$NetBSD: setup.c,v 1.33 2016/08/15 18:42:15 jdolecek Exp $");
+__RCSID("$NetBSD: setup.c,v 1.34 2016/08/15 18:57:06 jdolecek Exp $");
 #endif
 #endif /* not lint */
 
@@ -306,7 +306,7 @@ readsb(int listerr)
 	}
 	if (sblock.e2fs.e2fs_rev > E2FS_REV0 &&
 	    (!powerof2(sblock.e2fs.e2fs_inode_size) ||
-	     sblock.e2fs.e2fs_inode_size < sizeof(struct ext2fs_dinode) ||
+	     sblock.e2fs.e2fs_inode_size < EXT2_REV0_DINODE_SIZE ||
 	     sblock.e2fs.e2fs_inode_size >
 	      (1024 << sblock.e2fs.e2fs_log_bsize))) {
 		badsb(listerr, "BAD INODE_SIZE");

Reply via email to