file: update to 5.22

This commit is contained in:
Bruce Liu 2015-01-14 15:45:19 +00:00
parent 95c7361bcb
commit 7062ca0f66
2 changed files with 9 additions and 29 deletions

View File

@ -1,18 +0,0 @@
diff --git a/src/readelf.c b/src/readelf.c
index 08f81f5..9ebdebd 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -477,6 +477,13 @@ donote(struct magic_set *ms, void *vbuf, size_t offset, size_t size,
uint32_t namesz, descsz;
unsigned char *nbuf = CAST(unsigned char *, vbuf);
+ if (xnh_sizeof + offset > size) {
+ /*
+ * We're out of note headers.
+ */
+ return xnh_sizeof + offset;
+ }
+
(void)memcpy(xnh_addr, &nbuf[offset], xnh_sizeof);
offset += xnh_sizeof;

View File

@ -1,5 +1,5 @@
pkgname=file
pkgver=5.20
pkgver=5.22
pkgrel=1
pkgdesc="File type identification utility"
arch=('x86_64')
@ -7,15 +7,8 @@ license=('custom')
groups=('base')
url="http://www.darwinsys.com/file/"
depends=('glibc' 'zlib')
source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz"
'01-cve-2014-3710.patch')
sha1sums=('4e93e9ae915f1812b05cc6012ae968fdb6416f8f'
'b8a422fe93e1bdda289cbb8174090dd4ef33ccf8')
prepare() {
# https://bugs.archlinux.org/task/42759
patch -p1 -d $pkgname-$pkgver < '01-cve-2014-3710.patch'
}
source=("ftp://ftp.astron.com/pub/$pkgname/$pkgname-$pkgver.tar.gz")
sha1sums=('20fa06592291555f2b478ea2fb70b53e9e8d1f7c')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@ -24,11 +17,16 @@ build() {
make
}
check() {
cd $pkgname-$pkgver
make check
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
rmdir "$pkgdir/usr/share/man/man5"
rmdir -v "$pkgdir/usr/share/man/man5"
}