]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
libext2fs: fix bug when reading or writing more than 2GB in unix_io
authorTheodore Ts'o <tytso@mit.edu>
Mon, 4 Nov 2019 21:43:41 +0000 (16:43 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 4 Nov 2019 21:43:41 +0000 (16:43 -0500)
commit9bfbf1d5b93388d62a7f0eb498ab30d7a6aab871
treec6b17257d7d0555b8fc594b5c3a0307ced0644a3
parent8692a3acf91cb2f0ece33fa44bd351152e481c79
libext2fs: fix bug when reading or writing more than 2GB in unix_io

If count * block_size exceeds 2GB, we will overflow a 32-bit signed
integer value.  This shouldn't happen in practice except for
fuzz-corrupted file systems, but let's fix the code so it's correct.

Bug: https://github.com/tytso/e2fsprogs/issues/24
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/unix_io.c