From 6ca38e8c7dbc4b443602eae2781701b40c90edaf Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 22 Aug 2017 17:09:31 -0400 Subject: [PATCH] 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 --- lib/ext2fs/imager.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ext2fs/imager.c b/lib/ext2fs/imager.c index b643cc6..357443f 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; -- 1.8.3.1