]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix a wrong check on a result of lseek.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sat, 25 Feb 2012 09:38:13 +0000 (18:38 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 26 Feb 2012 07:01:31 +0000 (16:01 +0900)
libarchive/archive_read_disk_entry_from_file.c

index 8fcd0abf9d3a3593de8fd18a43be29f9e41c1a6b..0fef3c7458c7d521252673ff545f9a724d77d2ee 100644 (file)
@@ -1033,7 +1033,7 @@ setup_sparse(struct archive_read_disk *a,
                        goto exit_setup_sparse;
                }
                off_e = lseek(*fd, off_s, SEEK_HOLE);
-               if (off_s == (off_t)-1) {
+               if (off_e == (off_t)-1) {
                        if (errno == ENXIO) {
                                off_e = lseek(*fd, 0, SEEK_END);
                                if (off_e != (off_t)-1)