]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
libext2fs: fix Large File Support bug in ext2fs_image_inode_write()
authorTheodore Ts'o <tytso@mit.edu>
Tue, 22 Aug 2017 21:09:31 +0000 (17:09 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 22 Aug 2017 21:09:31 +0000 (17:09 -0400)
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 <tytso@mit.edu>
lib/ext2fs/imager.c

index b643cc6f3fa062e19902d618a0554f81c7036410..357443f23852288e698682cd04b7f075e2e7c901 100644 (file)
@@ -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;