diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-23 08:18:38 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-11-25 21:34:50 +0000 |
commit | 26f62a423db22cb256c083dd77ca16e4686cf477 (patch) | |
tree | de4f693167711432d40801446a21e0d98c0c4c7f /meta/recipes-devtools/opkg/opkg/open_inner.patch | |
parent | f5efafffbce690ed924c5fd894d56774490b4520 (diff) | |
download | poky-26f62a423db22cb256c083dd77ca16e4686cf477.tar.gz |
opkg: Add upstream fixes for empty packages
An ipk with a zero size data.tar file caused opkg to crash with a
double free abort. Add the upstream fixes for this.
(From OE-Core rev: ea1ded0b47e85d039dfad2b59580817bfb335739)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/opkg/opkg/open_inner.patch')
-rw-r--r-- | meta/recipes-devtools/opkg/opkg/open_inner.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta/recipes-devtools/opkg/opkg/open_inner.patch b/meta/recipes-devtools/opkg/opkg/open_inner.patch new file mode 100644 index 0000000000..cf4cb2f74b --- /dev/null +++ b/meta/recipes-devtools/opkg/opkg/open_inner.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From alejandro.delcastillo@ni.com Wed Nov 20 22:35:02 2019 | ||
2 | From: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
3 | To: <opkg-devel@googlegroups.com>, <richard.purdie@linuxfoundation.org> | ||
4 | CC: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
5 | Subject: [opkg][PATCH 2/2] open_inner: add support for empty payloads | ||
6 | Date: Wed, 20 Nov 2019 16:34:48 -0600 | ||
7 | Message-ID: <20191120223448.26522-3-alejandro.delcastillo@ni.com> | ||
8 | X-Mailer: git-send-email 2.22.0 | ||
9 | In-Reply-To: <20191120223448.26522-1-alejandro.delcastillo@ni.com> | ||
10 | References: <20191120223448.26522-1-alejandro.delcastillo@ni.com> | ||
11 | MIME-Version: 1.0 | ||
12 | Content-Type: text/plain | ||
13 | Content-Transfer-Encoding: 8bit | ||
14 | |||
15 | Support for empty compressed payloads need to be explicitly enabled on | ||
16 | libarchive. | ||
17 | |||
18 | Signed-off-by: Alejandro del Castillo <alejandro.delcastillo@ni.com> | ||
19 | |||
20 | Upstream-Status: Backport | ||
21 | --- | ||
22 | libopkg/opkg_archive.c | 7 +++++++ | ||
23 | 1 file changed, 7 insertions(+) | ||
24 | |||
25 | diff --git a/libopkg/opkg_archive.c b/libopkg/opkg_archive.c | ||
26 | index 0e9ccea..f19cece 100644 | ||
27 | --- a/libopkg/opkg_archive.c | ||
28 | +++ b/libopkg/opkg_archive.c | ||
29 | @@ -618,6 +618,13 @@ static struct archive *open_inner(struct archive *outer) | ||
30 | goto err_cleanup; | ||
31 | } | ||
32 | |||
33 | + r = archive_read_support_format_empty(inner); | ||
34 | + if (r != ARCHIVE_OK) { | ||
35 | + opkg_msg(ERROR, "Empty format not supported: %s\n", | ||
36 | + archive_error_string(inner)); | ||
37 | + goto err_cleanup; | ||
38 | + } | ||
39 | + | ||
40 | r = archive_read_open(inner, data, NULL, inner_read, inner_close); | ||
41 | if (r != ARCHIVE_OK) { | ||
42 | opkg_msg(ERROR, "Failed to open inner archive: %s\n", | ||
43 | -- | ||
44 | 2.22.0 | ||
45 | |||
46 | |||