summaryrefslogtreecommitdiff
path: root/extra/tftp-hpa
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-03-04 00:01:47 +0000
committerroot <root@rshg054.dnsready.net>2012-03-04 00:01:47 +0000
commitf0fa42126da9e3eec6b98388b35c67929fa20dae (patch)
tree0a4ad5b073e8500ff0e8920ba509942598576463 /extra/tftp-hpa
parentd8fb549de0ef3299436c448f7b45fd8ebee8e733 (diff)
Sun Mar 4 00:01:47 UTC 2012
Diffstat (limited to 'extra/tftp-hpa')
-rw-r--r--extra/tftp-hpa/PKGBUILD15
-rw-r--r--extra/tftp-hpa/tftp-hpa-0.49-fortify-strcpy-crash.patch26
2 files changed, 37 insertions, 4 deletions
diff --git a/extra/tftp-hpa/PKGBUILD b/extra/tftp-hpa/PKGBUILD
index c72da64a7..6f33be75b 100644
--- a/extra/tftp-hpa/PKGBUILD
+++ b/extra/tftp-hpa/PKGBUILD
@@ -1,9 +1,9 @@
-# $Id: PKGBUILD 146535 2012-01-12 16:40:12Z tpowa $
+# $Id: PKGBUILD 151760 2012-03-02 09:20:56Z tpowa $
# Maintainer: dorphell <dorphell@archlinux.org>
# Contributor: Jose Javier <jojapa@terra.es>
pkgname=tftp-hpa
pkgver=5.2
-pkgrel=1
+pkgrel=2
pkgdesc="Official tftp server"
arch=('i686' 'x86_64')
url="http://www.kernel.org/pub/software/network/tftp/"
@@ -11,10 +11,16 @@ license=('BSD')
depends=('readline>=6.0.00')
conflicts=('netkit-tftp')
backup=('etc/conf.d/tftpd')
-source=(http://www.kernel.org/pub/software/network/tftp/tftp-hpa/$pkgname-$pkgver.tar.gz tftpd.rc tftpd.conf LICENSE)
+source=(http://www.kernel.org/pub/software/network/tftp/tftp-hpa/$pkgname-$pkgver.tar.gz
+ tftpd.rc
+ tftpd.conf
+ LICENSE
+ tftp-hpa-0.49-fortify-strcpy-crash.patch)
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
+ # fix #28103
+ patch -Np1 -i ../tftp-hpa-0.49-fortify-strcpy-crash.patch
./configure --prefix=/usr --mandir=/usr/share/man --without-tcpwrappers
make
}
@@ -32,4 +38,5 @@ package() {
md5sums=('3de3038e7c2bf6fc5d496825893ac8e7'
'83fbb6f52205d95951a3c059e5351ca2'
'414a79dc891bced056d99a9bb790fc9e'
- '6ce21e27b6fdc1a1adf85c81e42aeecf')
+ '6ce21e27b6fdc1a1adf85c81e42aeecf'
+ '22e8629ef19bc276a102c5d4d284c1bd')
diff --git a/extra/tftp-hpa/tftp-hpa-0.49-fortify-strcpy-crash.patch b/extra/tftp-hpa/tftp-hpa-0.49-fortify-strcpy-crash.patch
new file mode 100644
index 000000000..e9b70d471
--- /dev/null
+++ b/extra/tftp-hpa/tftp-hpa-0.49-fortify-strcpy-crash.patch
@@ -0,0 +1,26 @@
+diff -urN tftp-hpa-0.49.orig/tftp/tftp.c tftp-hpa-0.49/tftp/tftp.c
+--- tftp-hpa-0.49.orig/tftp/tftp.c 2008-10-20 18:08:31.000000000 -0400
++++ tftp-hpa-0.49/tftp/tftp.c 2009-08-05 09:47:18.072585848 -0400
+@@ -279,15 +279,16 @@
+ struct tftphdr *tp, const char *mode)
+ {
+ char *cp;
++ size_t len;
+
+ tp->th_opcode = htons((u_short) request);
+ cp = (char *)&(tp->th_stuff);
+- strcpy(cp, name);
+- cp += strlen(name);
+- *cp++ = '\0';
+- strcpy(cp, mode);
+- cp += strlen(mode);
+- *cp++ = '\0';
++ len = strlen(name) + 1;
++ memcpy(cp, name, len);
++ cp += len;
++ len = strlen(mode) + 1;
++ memcpy(cp, mode, len);
++ cp += len;
+ return (cp - (char *)tp);
+ }
+