Module Name:    src
Committed By:   christos
Date:           Fri Apr 21 19:33:56 UTC 2017

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

Log Message:
Fix previous properly (wrong variable was tested) thanks riastradh@


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sbin/fsck_ext2fs/pass1.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/pass1.c
diff -u src/sbin/fsck_ext2fs/pass1.c:1.25 src/sbin/fsck_ext2fs/pass1.c:1.26
--- src/sbin/fsck_ext2fs/pass1.c:1.25	Fri Apr 21 13:33:04 2017
+++ src/sbin/fsck_ext2fs/pass1.c	Fri Apr 21 15:33:56 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: pass1.c,v 1.25 2017/04/21 17:33:04 christos Exp $	*/
+/*	$NetBSD: pass1.c,v 1.26 2017/04/21 19:33:56 christos Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -58,7 +58,7 @@
 #if 0
 static char sccsid[] = "@(#)pass1.c	8.1 (Berkeley) 6/5/93";
 #else
-__RCSID("$NetBSD: pass1.c,v 1.25 2017/04/21 17:33:04 christos Exp $");
+__RCSID("$NetBSD: pass1.c,v 1.26 2017/04/21 19:33:56 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -239,7 +239,7 @@ checkinode(ino_t inumber, struct inodesc
 		 * will detect any garbage after symlink string.
 		 */
 		if (inosize(dp) < EXT2_MAXSYMLINKLEN ||
-		    EXT2_MAXSYMLINKLEN == 0) {
+		    (EXT2_MAXSYMLINKLEN == 0 && inonblock(dp) == 0)) {
 			ndb = howmany(inosize(dp), sizeof(u_int32_t));
 			if (ndb > EXT2FS_NDADDR) {
 				j = ndb - EXT2FS_NDADDR;

Reply via email to