Whamcloud - gitweb
resize2fs: Add sanity check for off_t overflow before truncating
authorTheodore Ts'o <tytso@mit.edu>
Mon, 21 Jan 2008 18:43:18 +0000 (13:43 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 21 Jan 2008 18:43:18 +0000 (13:43 -0500)
commit98dca6c552d73cc39a3cb9d16947b2df5c55ef21
treef52763136b635ae9a1b39f0d77cb87e23d0e09a3
parent153439222e6a16e40be324408d8d19361bc1e65e
resize2fs: Add sanity check for off_t overflow before truncating

If we can't use ftruncate64(), and have to use ftruncate() instead,
make sure that we don't accidentally truncate the size when we chop it
down to an off_t before calling ftruncate(), lest we severely damage a
filesystem image file.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
resize/main.c