summaryrefslogtreecommitdiff
path: root/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
diff options
context:
space:
mode:
Diffstat (limited to 'archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c')
-rw-r--r--archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c b/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
index bccbf896603..8ca422ec066 100644
--- a/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
+++ b/archivers/libarchive/files/libarchive/archive_read_support_format_7zip.c
@@ -2964,13 +2964,7 @@ get_uncompressed_data(struct archive_read *a, const void **buff, size_t size,
if (zip->codec == _7Z_COPY && zip->codec2 == (unsigned long)-1) {
/* Copy mode. */
- /*
- * Note: '1' here is a performance optimization.
- * Recall that the decompression layer returns a count of
- * available bytes; asking for more than that forces the
- * decompressor to combine reads by copying data.
- */
- *buff = __archive_read_ahead(a, 1, &bytes_avail);
+ *buff = __archive_read_ahead(a, minimum, &bytes_avail);
if (bytes_avail <= 0) {
archive_set_error(&a->archive,
ARCHIVE_ERRNO_FILE_FORMAT,
@@ -3323,8 +3317,7 @@ setup_decode_folder(struct archive_read *a, struct _7z_folder *folder,
* Release the memory which the previous folder used for BCJ2.
*/
for (i = 0; i < 3; i++) {
- if (zip->sub_stream_buff[i] != NULL)
- free(zip->sub_stream_buff[i]);
+ free(zip->sub_stream_buff[i]);
zip->sub_stream_buff[i] = NULL;
}