summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2002-06-23 22:34:58 +0000
committerIan Dowse <iedowse@FreeBSD.org>2002-06-23 22:34:58 +0000
commit0f14ccf13accbc58c8bd664d2c39c56e8df714fc (patch)
tree450802270a7e40b3b066e32624caceac6abcdfa1 /sbin
parent7823af8fa29d24a48bd1a83bd4304eb1cb836d2e (diff)
Notes
Diffstat (limited to 'sbin')
-rw-r--r--sbin/fsck/pass1.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/fsck/pass1.c b/sbin/fsck/pass1.c
index 17a9252f3c29..3af7d479f2a8 100644
--- a/sbin/fsck/pass1.c
+++ b/sbin/fsck/pass1.c
@@ -208,6 +208,8 @@ checkinode(inumber, idesc)
lastino = inumber;
/* This should match the file size limit in ffs_mountfs(). */
kernmaxfilesize = (u_int64_t)0x40000000 * sblock.fs_bsize - 1;
+ if (kernmaxfilesize > (u_int64_t)0x80000000u * PAGE_SIZE - 1)
+ kernmaxfilesize = (u_int64_t)0x80000000u * PAGE_SIZE - 1;
if (dp->di_size > kernmaxfilesize ||
dp->di_size > sblock.fs_maxfilesize ||
(mode == IFDIR && dp->di_size > MAXDIRSIZE)) {