diff options
author | muhviehstah | 2016-10-15 12:33:00 +0200 |
---|---|---|
committer | muhviehstah | 2016-10-15 12:33:00 +0200 |
commit | 966c4b305c1dfc6f6855a6ed14bac009369d0986 (patch) | |
tree | 55a83447b4a78da40fa68a6f96a5215e3bb0e954 | |
parent | c127c8811d9298b8eb6bd8a03ed83a532b7a2997 (diff) | |
download | aur-966c4b305c1dfc6f6855a6ed14bac009369d0986.tar.gz |
fixed build and added stack overflow patch
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 15 | ||||
-rw-r--r-- | read_fragment_table_n_stack_overflow-fix.patch | 27 |
3 files changed, 41 insertions, 7 deletions
@@ -1,19 +1,21 @@ pkgbase = sasquatch pkgdesc = Tools for squashfs, a highly compressed read-only filesystem for Linux. pkgver = 4.3 - pkgrel = 5 + pkgrel = 6 url = https://github.com/devttys0/sasquatch arch = i686 arch = x86_64 license = GPL - makedepends = gcc49 + makedepends = gcc5 depends = gzip depends = zlib depends = lzo depends = xz depends = lz4 source = git+https://github.com/devttys0/sasquatch + source = read_fragment_table_n_stack_overflow-fix.patch sha256sums = SKIP + sha256sums = 120c2d208085129235bf998b1c22abee19db26120a98174b9beb5edd7b9c84e9 pkgname = sasquatch @@ -6,15 +6,17 @@ pkgname=sasquatch _origpkgname=squashfs-tools pkgver=4.3 -pkgrel=5 +pkgrel=6 pkgdesc="Tools for squashfs, a highly compressed read-only filesystem for Linux." url="https://github.com/devttys0/sasquatch" license=("GPL") arch=('i686' 'x86_64') depends=('gzip' 'zlib' 'lzo' 'xz' 'lz4') -makedepends=('gcc49') -source=('git+https://github.com/devttys0/sasquatch') -sha256sums=('SKIP') +makedepends=('gcc5') +source=('git+https://github.com/devttys0/sasquatch' + 'read_fragment_table_n_stack_overflow-fix.patch') +sha256sums=('SKIP' + '120c2d208085129235bf998b1c22abee19db26120a98174b9beb5edd7b9c84e9') build() { cd ${srcdir}/sasquatch/ @@ -23,7 +25,10 @@ build() { cd squashfs4.3 patch -p0 < ../patches/patch0.txt cd squashfs-tools - CC=gcc-4.9 make + patch -p0 -i "${srcdir}/read_fragment_table_n_stack_overflow-fix.patch" + export CC=gcc-5 + export CXX=g++-5 + make # INSTALL_DIR="${pkgdir}"/usr/bin CC=gcc-4.9 make -j5 } diff --git a/read_fragment_table_n_stack_overflow-fix.patch b/read_fragment_table_n_stack_overflow-fix.patch new file mode 100644 index 000000000000..a9d39201aed3 --- /dev/null +++ b/read_fragment_table_n_stack_overflow-fix.patch @@ -0,0 +1,27 @@ +--- unsquash-4.c 2014-03-09 06:31:59.000000000 +0100 ++++ unsquash-4.c.1 2016-10-15 11:41:12.914245961 +0200 +@@ -31,9 +31,9 @@ + int read_fragment_table_4(long long *directory_table_end) + { + int res, i; +- int bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments); +- int indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments); +- long long fragment_table_index[indexes]; ++ size_t bytes = SQUASHFS_FRAGMENT_BYTES(sBlk.s.fragments); ++ size_t indexes = SQUASHFS_FRAGMENT_INDEXES(sBlk.s.fragments); ++ long long *fragment_table_index; + + TRACE("read_fragment_table: %d fragments, reading %d fragment indexes " + "from 0x%llx\n", sBlk.s.fragments, indexes, +@@ -44,6 +44,11 @@ + return TRUE; + } + ++ fragment_table_index = malloc(indexes*sizeof(long long)); ++ if(fragment_table_index == NULL) ++ EXIT_UNSQUASH("read_fragment_table: failed to allocate " ++ "fragment table index\n"); ++ + fragment_table = malloc(bytes); + if(fragment_table == NULL) + EXIT_UNSQUASH("read_fragment_table: failed to allocate " |