Commit c7786840 authored by Peter Pentchev's avatar Peter Pentchev

Add three upstream patches.

parent 46fb448c
Description: 7zip: fix crash when parsing certain archives
Origin: upstream; https://github.com/libarchive/libarchive/commit/65a23f5dbee4497064e9bb467f81138a62b0dae1
Author: Daniel Axtens <dja@axtens.net>
Last-Update: 2019-02-06
--- a/libarchive/archive_read_support_format_7zip.c
+++ b/libarchive/archive_read_support_format_7zip.c
@@ -2964,13 +2964,7 @@
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,
Description: iso9660: Fail when expected Rockridge extensions is missing
Origin: upstream; https://github.com/libarchive/libarchive/commit/8312eaa576014cd9b965012af51bc1f967b12423
Author: Daniel Axtens <dja@axtens.net>
Last-Update: 2019-02-06
--- a/libarchive/archive_read_support_format_iso9660.c
+++ b/libarchive/archive_read_support_format_iso9660.c
@@ -2102,6 +2102,7 @@
const unsigned char *p, const unsigned char *end)
{
struct iso9660 *iso9660;
+ int entry_seen = 0;
iso9660 = (struct iso9660 *)(a->format->data);
@@ -2257,8 +2258,16 @@
}
p += p[2];
+ entry_seen = 1;
+ }
+
+ if (entry_seen)
+ return (ARCHIVE_OK);
+ else {
+ archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
+ "Tried to parse Rockridge extensions, but none found");
+ return (ARCHIVE_WARN);
}
- return (ARCHIVE_OK);
}
static int
......@@ -2,3 +2,6 @@ CVE-2018-1000877.patch
CVE-2018-1000878.patch
CVE-2018-1000879.patch
CVE-2018-1000880.patch
CVE-2019-1000019.patch
CVE-2019-1000020.patch
zip-nullptr.patch
Description: Fix a null pointer dereference bug in zip writer.
Origin: upstream; https://github.com/libarchive/libarchive/commit/71420844e50bcac2552dc6c781cc5a84c4bc1d96
Author: Young_X <YangX92@hotmail.com>
Last-Update: 2019-02-06
--- a/libarchive/archive_write_set_format_zip.c
+++ b/libarchive/archive_write_set_format_zip.c
@@ -1430,6 +1430,9 @@
type = archive_entry_filetype(entry);
written_bytes = 0;
+ if (path == NULL)
+ return (ARCHIVE_FATAL);
+
ret = __archive_write_output(archive, path, strlen(path));
if (ret != ARCHIVE_OK)
return (ARCHIVE_FATAL);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment