diff options
author | root <root@rshg054.dnsready.net> | 2012-12-27 01:22:37 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-12-27 01:22:37 -0800 |
commit | 4b9819d98573d82cec1b07beb719390f5fa4aed1 (patch) | |
tree | 5606de36a177647ce905bc34a28b7f01806d4ff3 /extra/cvsps | |
parent | 93079feae1048abe4ebe1ddc66197f31e1206101 (diff) |
Thu Dec 27 01:22:36 PST 2012
Diffstat (limited to 'extra/cvsps')
-rw-r--r-- | extra/cvsps/PKGBUILD | 35 | ||||
-rw-r--r-- | extra/cvsps/cvsps-buffer-overflow.patch | 66 |
2 files changed, 75 insertions, 26 deletions
diff --git a/extra/cvsps/PKGBUILD b/extra/cvsps/PKGBUILD index 650259bc1..de52490f0 100644 --- a/extra/cvsps/PKGBUILD +++ b/extra/cvsps/PKGBUILD @@ -1,41 +1,24 @@ -# $Id: PKGBUILD 151779 2012-03-02 17:28:27Z dan $ +# $Id: PKGBUILD 173886 2012-12-27 03:34:13Z dan $ # Maintainer: # Contributor: Jeff 'codemac' Mickey <jeff@archlinux.org> pkgname=cvsps -pkgver=2.2b1 +pkgver=3.2 pkgrel=1 pkgdesc="Generating 'patchset' information from a CVS repository" -url="http://www.cobite.com/cvsps/" +url="http://www.catb.org/esr/cvsps/" license=('GPL') arch=('i686' 'x86_64') depends=('zlib') -source=("http://www.cobite.com/${pkgname}/${pkgname}-${pkgver}.tar.gz" - call-cvs-q-option.patch - cvsps-2.2b1-bufferoverflow.patch - cvsps-2.2b1-dynamic-logbuf.patch - cvsps-2.2b1-man.patch - seperate-CPPFLAGS.patch - use-INADDR_NONE-define.patch - use-__linux__-define.patch - use-offsetof-macro.patch) -md5sums=('997580e8e283034995b9209076858c68' - '06324c5e3c321126b76dc97fc6c00b34' - '2910012a11a24d5e4192cf9eae7dd259' - '970566460e72cb159426965d6e5763b3' - 'f9d2ee40e52ecd5096fa9a885418eee1' - '6baafbd7512aa52e1b83ed0bead32a6e' - 'a3a81481c07dcc676f5a82ae07e8ee89' - '9e2763315cbda02665c47827d38df459' - '8f7e6f09f42f76deeefe24bbfa509150') +makedepends=('asciidoc') +source=("http://www.catb.org/~esr/cvsps/cvsps-${pkgver}.tar.gz" + cvsps-buffer-overflow.patch) +md5sums=('4a00c4b0d504078268db7c6c68decc38' + '6cfe55ee7f1137f9d2e670502d8cc3c7') build() { cd "$srcdir/$pkgname-$pkgver" - for file in ${source[@]}; do - if [[ $file == *.patch ]]; then - patch -Np1 < ../$file - fi - done + patch -Np1 < ../cvsps-buffer-overflow.patch make prefix=/usr } diff --git a/extra/cvsps/cvsps-buffer-overflow.patch b/extra/cvsps/cvsps-buffer-overflow.patch new file mode 100644 index 000000000..e34fd6ee3 --- /dev/null +++ b/extra/cvsps/cvsps-buffer-overflow.patch @@ -0,0 +1,66 @@ +diff -Naur cvsps-3.2.orig/cvsps.c cvsps-3.2/cvsps.c +--- cvsps-3.2.orig/cvsps.c 2012-12-24 19:23:24.000000000 +0000 ++++ cvsps-3.2/cvsps.c 2012-12-27 03:28:24.698076155 +0000 +@@ -1078,17 +1078,16 @@ + static CvsFile * parse_rcs_file(const char * buff) + { + char fn[PATH_MAX]; +- int len = strlen(buff + 10); ++ size_t len = strlen(buff + 10); + char * p; + + /* once a single file has been parsed ok we set this */ + static bool path_ok; +- ++ + /* chop the ",v" string and the "LF" */ + len -= 3; + memcpy(fn, buff + 10, len); + fn[len] = 0; +- + if (strncmp(fn, strip_path, strip_path_len) != 0) + { + /* if the very first file fails the strip path, +@@ -1109,10 +1108,10 @@ + + while ((p = strstr(p, repository_path))) + lastp = p++; +- ++ + if (lastp) + { +- int len = strlen(repository_path); ++ size_t len = strlen(repository_path); + memcpy(strip_path, fn, lastp - fn + len + 1); + strip_path_len = lastp - fn + len + 1; + strip_path[strip_path_len] = 0; +@@ -1136,16 +1135,26 @@ + * + * For now just ignore such files + */ +- debug(DEBUG_APPWARN, "WARNING: file %s doesn't match strip_path %s. ignoring", ++ debug(DEBUG_APPWARN, "WARNING: file %s doesn't match strip_path %s. ignoring", + fn, strip_path); + return NULL; + } + + ok: +- path_ok = true; +- ++ /* ++ fix for rhbz#576076 ++ ./cvsps --norc -q --cvs-direct -u -A --root :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot NSS ++ */ ++ if(len <= strip_path_len) ++ { ++ debug(DEBUG_APPWARN, "WARNING: file %s doesn't match strip_path %s. ignoring", ++ fn, strip_path); ++ return NULL; ++ } + /* remove from beginning the 'strip_path' string */ + len -= strip_path_len; ++ path_ok = true; ++ + memmove(fn, fn + strip_path_len, len); + fn[len] = 0; + |