[git commit] libarchive: fix xmalloc_open_zipped_read_close()

Denys Vlasenko vda.linux at googlemail.com
Tue Jun 21 00:04:16 UTC 2016


commit: https://git.busybox.net/busybox/commit/?id=10c0e9178606bb71a071c27dcda3fd2787e8303b
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master

Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
 archival/libarchive/open_transformer.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c
index a3018d9..ac7e5db 100644
--- a/archival/libarchive/open_transformer.c
+++ b/archival/libarchive/open_transformer.c
@@ -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);
 	}
 


More information about the busybox-cvs mailing list