[arch-commits] Commit in tftp-hpa/trunk (2 files)

Tobias Powalowski tpowa at archlinux.org
Fri Mar 2 04:20:09 EST 2012


    Date: Friday, March 2, 2012 @ 04:20:09
  Author: tpowa
Revision: 151759

upgpkg: tftp-hpa 5.2-2

fix 28103

Added:
  tftp-hpa/trunk/tftp-hpa-0.49-fortify-strcpy-crash.patch
Modified:
  tftp-hpa/trunk/PKGBUILD

------------------------------------------+
 PKGBUILD                                 |   13 ++++++++++---
 tftp-hpa-0.49-fortify-strcpy-crash.patch |   26 ++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-03-02 09:09:32 UTC (rev 151758)
+++ PKGBUILD	2012-03-02 09:20:09 UTC (rev 151759)
@@ -3,7 +3,7 @@
 # Contributor: Jose Javier  <jojapa at 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 @@
 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 @@
 md5sums=('3de3038e7c2bf6fc5d496825893ac8e7'
          '83fbb6f52205d95951a3c059e5351ca2'
          '414a79dc891bced056d99a9bb790fc9e'
-         '6ce21e27b6fdc1a1adf85c81e42aeecf')
+         '6ce21e27b6fdc1a1adf85c81e42aeecf'
+         '22e8629ef19bc276a102c5d4d284c1bd')

Added: tftp-hpa-0.49-fortify-strcpy-crash.patch
===================================================================
--- tftp-hpa-0.49-fortify-strcpy-crash.patch	                        (rev 0)
+++ tftp-hpa-0.49-fortify-strcpy-crash.patch	2012-03-02 09:20:09 UTC (rev 151759)
@@ -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);
+ }
+ 



More information about the arch-commits mailing list