summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Väth <martin@mvath.de>2018-05-30 19:02:42 +0200
committerMartin Väth <martin@mvath.de>2018-05-30 19:02:42 +0200
commit3ee655d8eac7676a033d14b01c3f470126bb09ea (patch)
treef82feddaad0d5fa509fa3815e49666b9aa8dcf65 /sys-fs/squashfs-tools
parentwww-plugins: Version bumps (diff)
downloadmv-3ee655d8eac7676a033d14b01c3f470126bb09ea.tar.gz
mv-3ee655d8eac7676a033d14b01c3f470126bb09ea.tar.bz2
mv-3ee655d8eac7676a033d14b01c3f470126bb09ea.zip
sys-fs/squashfs-tools: https://forums.gentoo.org/viewtopic-t-1081786.html
Diffstat (limited to 'sys-fs/squashfs-tools')
-rw-r--r--sys-fs/squashfs-tools/files/squashfs-tools-4.3-smallstack.patch15
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-4.3.1_alpha20171129-r2.ebuild (renamed from sys-fs/squashfs-tools/squashfs-tools-4.3.1_alpha20171129-r1.ebuild)1
-rw-r--r--sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild1
3 files changed, 17 insertions, 0 deletions
diff --git a/sys-fs/squashfs-tools/files/squashfs-tools-4.3-smallstack.patch b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-smallstack.patch
new file mode 100644
index 00000000..be8d537a
--- /dev/null
+++ b/sys-fs/squashfs-tools/files/squashfs-tools-4.3-smallstack.patch
@@ -0,0 +1,15 @@
+# Do not require a large stack. This is necessary for e.g. musl, see
+# https://sourceforge.net/p/squashfs/bugs/59/
+--- a/unsquashfs.c
++++ b/unsquashfs.c
+@@ -2136,7 +2136,9 @@
+ */
+ void *inflator(void *arg)
+ {
+- char tmp[block_size];
++ char *tmp = malloc(block_size);
++ if(tmp == NULL)
++ EXIT_UNSQUASH("Out of memory allocating block buffer\n");
+
+ while(1) {
+ struct cache_entry *entry = queue_get(to_inflate);
diff --git a/sys-fs/squashfs-tools/squashfs-tools-4.3.1_alpha20171129-r1.ebuild b/sys-fs/squashfs-tools/squashfs-tools-4.3.1_alpha20171129-r2.ebuild
index 20af011d..db352359 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-4.3.1_alpha20171129-r1.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-4.3.1_alpha20171129-r2.ebuild
@@ -69,6 +69,7 @@ src_prepare() {
eapply -p2 "${FILESDIR}"/${Pm}-aligned-data.patch
eapply "${FILESDIR}"/${Pm}-local-cve-fix.patch
eapply "${FILESDIR}"/${Pm}-static-inline.patch
+ eapply "${FILESDIR}"/${Pm}-smallstack.patch
default
}
diff --git a/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild b/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild
index 20af011d..db352359 100644
--- a/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild
+++ b/sys-fs/squashfs-tools/squashfs-tools-99999999.ebuild
@@ -69,6 +69,7 @@ src_prepare() {
eapply -p2 "${FILESDIR}"/${Pm}-aligned-data.patch
eapply "${FILESDIR}"/${Pm}-local-cve-fix.patch
eapply "${FILESDIR}"/${Pm}-static-inline.patch
+ eapply "${FILESDIR}"/${Pm}-smallstack.patch
default
}