Whamcloud - gitweb
libext2fs: don't allow ridiculously large logical block numbers
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 12 Dec 2013 17:40:31 +0000 (12:40 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 Dec 2013 17:40:58 +0000 (12:40 -0500)
commit1e7451493ed67ae94ba5c1d2bed059527bc9848d
treefc66557fb3b68866387d543905ef2e4f569508f4
parent57d4fb66d237fd8b734d2aa6b13502fac9c6e5a3
libext2fs: don't allow ridiculously large logical block numbers

Forbid clients from trying to map logical block numbers that are
larger than the lblk->pblk data structures are capable of handling.
While we're at it, don't let clients set the file size to a number
that's beyond what can be mapped.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/ext2fs/bmap.c
lib/ext2fs/ext2fsP.h
lib/ext2fs/fileio.c