summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/libarchive/archive_read_support_compression_program.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libarchive/archive_read_support_compression_program.c b/lib/libarchive/archive_read_support_compression_program.c
index d406797..dfea568 100644
--- a/lib/libarchive/archive_read_support_compression_program.c
+++ b/lib/libarchive/archive_read_support_compression_program.c
@@ -113,6 +113,7 @@ child_read(struct archive_read *a, char *buf, size_t buf_len)
{
struct archive_decompress_program *state = a->decompressor->data;
ssize_t ret, requested;
+ const void *child_buf;
if (state->child_stdout == -1)
return (-1);
@@ -138,8 +139,10 @@ restart_read:
return (-1);
if (state->child_in_buf_avail == 0) {
+ child_buf = state->child_in_buf;
ret = (a->client_reader)(&a->archive,
- a->client_data, (const void **)&state->child_in_buf);
+ a->client_data,&child_buf);
+ state->child_in_buf = (const char *)child_buf;
if (ret < 0) {
close(state->child_stdin);
OpenPOWER on IntegriCloud