]> 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:23:27 +0000 (16:23 +0900)
libarchive/archive_read_disk_entry_from_file.c

index 284b9e9733b3fe2b4df36aa3f142f3fb75b88854..cf0499ea146f125b8a5f77216750c97e4cc98832 100644 (file)
@@ -959,7 +959,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)