libarchive: fix xmalloc_open_zipped_read_close()
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 21 Jun 2016 00:04:16 +0000 (02:04 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 21 Jun 2016 00:04:16 +0000 (02:04 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/libarchive/open_transformer.c

index a3018d9ec3e616daf3a0b388d5236b4d5a84a443..ac7e5db95f5aa7db9184b6400d50477141be8aa1 100644 (file)
@@ -331,6 +331,9 @@ void* FAST_FUNC xmalloc_open_zipped_read_close(const char *fname, size_t *maxsz_
                }
        } else {
                /* File is not compressed */
+//FIXME: avoid seek
+               xlseek(xstate->src_fd, - xstate->signature_skipped, SEEK_CUR);
+               xstate->signature_skipped = 0;
                image = xmalloc_read(xstate->src_fd, maxsz_p);
        }