From: Theodore Ts'o Date: Tue, 22 Aug 2017 21:09:31 +0000 (-0400) Subject: libext2fs: fix Large File Support bug in ext2fs_image_inode_write() X-Git-Tag: v1.43.6~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ca38e8c7dbc4b443602eae2781701b40c90edaf;p=thirdparty%2Fe2fsprogs.git libext2fs: fix Large File Support bug in ext2fs_image_inode_write() We were using lseek() instead of ext2fs_llseek(). This caused e2image to fail when writing an old-style e2image file if it was larger than 2 GiB. Addresses-Debian-Bug: #855246 Signed-off-by: Theodore Ts'o --- diff --git a/lib/ext2fs/imager.c b/lib/ext2fs/imager.c index b643cc6f3..357443f23 100644 --- a/lib/ext2fs/imager.c +++ b/lib/ext2fs/imager.c @@ -98,7 +98,8 @@ errcode_t ext2fs_image_inode_write(ext2_filsys fs, int fd, int flags) blk++; left--; cp += fs->blocksize; - r = lseek(fd, fs->blocksize, SEEK_CUR); + r = ext2fs_llseek(fd, fs->blocksize, + SEEK_CUR); if (r < 0) { retval = errno; goto errout;