diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-06-20 11:06:42 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-06-20 11:06:42 +0200 |
commit | 984b0a613aaf1cdf48c2e2af08c8466a7bad8307 (patch) | |
tree | 57b512d3843221b92da936b46abd238d1a036a94 /include | |
parent | ecf25cb5bce27ca5820e2895d8458f38c406d105 (diff) | |
download | busybox-w32-984b0a613aaf1cdf48c2e2af08c8466a7bad8307.tar.gz busybox-w32-984b0a613aaf1cdf48c2e2af08c8466a7bad8307.tar.bz2 busybox-w32-984b0a613aaf1cdf48c2e2af08c8466a7bad8307.zip |
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.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/bb_archive.h b/include/bb_archive.h index 10969b567..2b9c5f04c 100644 --- a/include/bb_archive.h +++ b/include/bb_archive.h | |||
@@ -211,7 +211,7 @@ void dealloc_bunzip(bunzip_data *bd) FAST_FUNC; | |||
211 | 211 | ||
212 | /* Meaning and direction (input/output) of the fields are transformer-specific */ | 212 | /* Meaning and direction (input/output) of the fields are transformer-specific */ |
213 | typedef struct transformer_state_t { | 213 | typedef struct transformer_state_t { |
214 | smallint check_signature; /* most often referenced member */ | 214 | smallint signature_skipped; /* most often referenced member */ |
215 | 215 | ||
216 | IF_DESKTOP(long long) int FAST_FUNC (*xformer)(struct transformer_state_t *xstate); | 216 | IF_DESKTOP(long long) int FAST_FUNC (*xformer)(struct transformer_state_t *xstate); |
217 | USE_FOR_NOMMU(const char *xformer_prog;) | 217 | USE_FOR_NOMMU(const char *xformer_prog;) |
@@ -252,11 +252,11 @@ int bbunpack(char **argv, | |||
252 | void check_errors_in_children(int signo); | 252 | void check_errors_in_children(int signo); |
253 | #if BB_MMU | 253 | #if BB_MMU |
254 | void fork_transformer(int fd, | 254 | void fork_transformer(int fd, |
255 | int check_signature, | 255 | int signature_skipped, |
256 | IF_DESKTOP(long long) int FAST_FUNC (*transformer)(transformer_state_t *xstate) | 256 | IF_DESKTOP(long long) int FAST_FUNC (*transformer)(transformer_state_t *xstate) |
257 | ) FAST_FUNC; | 257 | ) FAST_FUNC; |
258 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), 1, (transformer)) | 258 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), 0, (transformer)) |
259 | #define fork_transformer_with_no_sig(fd, transformer) fork_transformer((fd), 0, (transformer)) | 259 | #define fork_transformer_with_no_sig(fd, transformer) fork_transformer((fd), 1, (transformer)) |
260 | #else | 260 | #else |
261 | void fork_transformer(int fd, const char *transform_prog) FAST_FUNC; | 261 | void fork_transformer(int fd, const char *transform_prog) FAST_FUNC; |
262 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), (transform_prog)) | 262 | #define fork_transformer_with_sig(fd, transformer, transform_prog) fork_transformer((fd), (transform_prog)) |