summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenys Vlasenko2016-06-20 11:06:42 +0200
committerDenys Vlasenko2016-06-20 11:06:42 +0200
commit984b0a613aaf1cdf48c2e2af08c8466a7bad8307 (patch)
tree57b512d3843221b92da936b46abd238d1a036a94 /include
parentecf25cb5bce27ca5820e2895d8458f38c406d105 (diff)
downloadbusybox-984b0a613aaf1cdf48c2e2af08c8466a7bad8307.zip
busybox-984b0a613aaf1cdf48c2e2af08c8466a7bad8307.tar.gz
libarchive: fix xmalloc_open_zipped_read_close() on NOMMU
The somewhat new "unpack in memory" code was broken for xmalloc_open_zipped_read_close() on NOMMU: we seek back over signature, but then expect it to be already consumed. Stop seeking back in this case. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r--include/bb_archive.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/bb_archive.h b/include/bb_archive.h
index 10969b5..2b9c5f0 100644
--- a/include/bb_archive.h
+++ b/include/bb_archive.h
@@ -211,7 +211,7 @@ void dealloc_bunzip(bunzip_data *bd) FAST_FUNC;
/* Meaning and direction (input/output) of the fields are transformer-specific */
typedef struct transformer_state_t {
- smallint check_signature; /* most often referenced member */
+ smallint signature_skipped; /* most often referenced member */
IF_DESKTOP(long long) int FAST_FUNC (*xformer)(struct transformer_state_t *xstate);
USE_FOR_NOMMU(const char *xformer_prog;)
@@ -252,11 +252,11 @@ int bbunpack(char **argv,
void check_errors_in_children(int signo);
#if BB_MMU
void fork_transformer(int fd,
- int check_signature,
+ int signature_skipped,
IF_DESKTOP(long long) int FAST_FUNC (*transformer)(transformer_state_t *xstate)
) FAST_FUNC;
-#define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), 1, (transformer))
-#define fork_transformer_with_no_sig(fd, transformer) fork_transformer((fd), 0, (transformer))
+#define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), 0, (transformer))
+#define fork_transformer_with_no_sig(fd, transformer) fork_transformer((fd), 1, (transformer))
#else
void fork_transformer(int fd, const char *transform_prog) FAST_FUNC;
#define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), (transform_prog))