summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Reffett <creffett@gentoo.org>2013-10-04 20:51:42 +0000
committerChris Reffett <creffett@gentoo.org>2013-10-04 20:51:42 +0000
commit9065d7d7127bc73c1db107e8599d12568b3df226 (patch)
treeec9873342efc1bd42cb0b7e7e3e0f37e3f9f3fc7 /net-analyzer
parentVersion bump (diff)
downloadgentoo-2-9065d7d7127bc73c1db107e8599d12568b3df226.tar.gz
gentoo-2-9065d7d7127bc73c1db107e8599d12568b3df226.tar.bz2
gentoo-2-9065d7d7127bc73c1db107e8599d12568b3df226.zip
Security bump wrt bug 261191
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 42618354)
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/tptest/ChangeLog11
-rw-r--r--net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch152
-rw-r--r--net-analyzer/tptest/tptest-3.1.7-r2.ebuild (renamed from net-analyzer/tptest/tptest-3.1.7-r1.ebuild)13
3 files changed, 169 insertions, 7 deletions
diff --git a/net-analyzer/tptest/ChangeLog b/net-analyzer/tptest/ChangeLog
index d70ab4a3105f..e383e183d4b3 100644
--- a/net-analyzer/tptest/ChangeLog
+++ b/net-analyzer/tptest/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-analyzer/tptest
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tptest/ChangeLog,v 1.12 2010/09/20 18:32:35 jer Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tptest/ChangeLog,v 1.13 2013/10/04 20:51:42 creffett Exp $
+
+*tptest-3.1.7-r2 (04 Oct 2013)
+
+ 04 Oct 2013; Chris Reffett <creffett@gentoo.org>
+ +files/tptest-3.1.7-getstatsfromlinevuln.patch, +tptest-3.1.7-r2.ebuild,
+ -tptest-3.1.7-r1.ebuild:
+ Security bump wrt bug 261191
*tptest-3.1.7-r1 (20 Sep 2010)
diff --git a/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch b/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch
new file mode 100644
index 000000000000..ad0cf08c18a9
--- /dev/null
+++ b/net-analyzer/tptest/files/tptest-3.1.7-getstatsfromlinevuln.patch
@@ -0,0 +1,152 @@
+diff -Nurp tptest-3.1.7/engine/tpcommon.c tptest-3.1.7.new/engine/tpcommon.c
+--- tptest-3.1.7/engine/tpcommon.c 2004-03-22 15:49:12.000000000 -0500
++++ tptest-3.1.7.new/engine/tpcommon.c 2009-06-11 16:48:25.000000000 -0400
+@@ -37,6 +37,8 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdarg.h>
++#include <stdlib.h>
++#include <stddef.h>
+
+ #ifdef UNIX
+ #include <sys/time.h>
+@@ -194,68 +196,76 @@ done:
+
+
+ // Fill a tpStats structure with the contents from a STATS line
+-int GetStatsFromLine(char *line, TPStats *s)
++int GetStatsFromLine(const char *line, TPStats *s)
+ {
+ char valBuf[30];
++ char * stats_ptr = NULL;
+
+ if (strncmp(line, "STATS ", 6) != 0)
+ return -1;
+- memset(valBuf, 0, 30);
++ memset(valBuf, 0, sizeof(valBuf));
++ stats_ptr = ((char *)line)+6;
+
+- if (CopyTagField(valBuf, 29, line+6, "majorv"))
+- s->MajorVersion = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "minorv"))
+- s->MinorVersion = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "pktssent"))
+- s->PktsSent = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "pktsunsent"))
+- s->PktsUnSent = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "pktsrcvd"))
+- s->PktsRecvd = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "bytessent"))
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "majorv"))
++ s->MajorVersion = (USHORT) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "minorv"))
++ s->MinorVersion = (USHORT) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktssent"))
++ s->PktsSent = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktsunsent"))
++ s->PktsUnSent = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pktsrcvd"))
++ s->PktsRecvd = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "bytessent"))
+ sscanf(valBuf, "%" LONG_LONG_PREFIX "d", &(s->BytesSent));
+- if (CopyTagField(valBuf, 29, line+6, "bytesrcvd"))
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "bytesrcvd"))
+ sscanf(valBuf, "%" LONG_LONG_PREFIX "d", &(s->BytesRecvd));
+- if (CopyTagField(valBuf, 29, line+6, "maxrtt"))
+- s->MaxRoundtrip = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "minrtt"))
+- s->MinRoundtrip = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "oocount"))
+- s->ooCount = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "txstart_s"))
+- s->StartSend.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "txstart_us"))
+- s->StartSend.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "txstop_s"))
+- s->StopSend.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "txstop_us"))
+- s->StopSend.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "rxstart_s"))
+- s->StartRecv.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "rxstart_us"))
+- s->StartRecv.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "rxstop_s"))
+- s->StopRecv.tv_sec = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "rxstop_us"))
+- s->StopRecv.tv_usec = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 29, line+6, "totrtt"))
+- s->TotalRoundtrip = atoi(valBuf);
+- if (CopyTagField(valBuf, 29, line+6, "nortt"))
+- s->nRoundtrips = atoi(valBuf);
+-
+- if (CopyTagField(valBuf, 101, line + 6, "email"))
+- strcpy(s->email, valBuf);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "maxrtt"))
++ s->MaxRoundtrip = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "minrtt"))
++ s->MinRoundtrip = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "oocount"))
++ s->ooCount = (UINT32) strtoul(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstart_s"))
++ s->StartSend.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstart_us"))
++ s->StartSend.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstop_s"))
++ s->StopSend.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "txstop_us"))
++ s->StopSend.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstart_s"))
++ s->StartRecv.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstart_us"))
++ s->StartRecv.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstop_s"))
++ s->StopRecv.tv_sec = strtol(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "rxstop_us"))
++ s->StopRecv.tv_usec = strtol(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "totrtt"))
++ s->TotalRoundtrip = (UINT32) strtoul(valBuf,NULL,10);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "nortt"))
++ s->nRoundtrips = (UINT32) strtoul(valBuf,NULL,10);
++
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "email"))
++ {
++ strncpy(s->email, valBuf, sizeof(s->email));
++ s->email[sizeof(s->email)-1] = '\0';
++ }
+
+- if (CopyTagField(valBuf, 101, line + 6, "pwd"))
+- strcpy(s->pwd, valBuf);
++ if (CopyTagField(valBuf, sizeof(valBuf)-1, stats_ptr, "pwd"))
++ {
++ strncpy(s->pwd, valBuf, sizeof(s->pwd));
++ s->pwd[sizeof(s->pwd)-1] = '\0';
++ }
+
++ stats_ptr = NULL;
+ return 0;
+-
+ }
+
+
+diff -Nurp tptest-3.1.7/engine/tpcommon.h tptest-3.1.7.new/engine/tpcommon.h
+--- tptest-3.1.7/engine/tpcommon.h 2002-09-16 10:10:42.000000000 -0400
++++ tptest-3.1.7.new/engine/tpcommon.h 2009-06-11 16:40:10.000000000 -0400
+@@ -43,7 +43,7 @@ int SameTag(char *s1, char *s2);
+ int CopyTagField(char *destp, int destSize, char *srcp, char *pname);
+ int GetSessionFromLine(char *, TPEngine *);
+ char * CreateSessionLine(TPEngine *, char *);
+-int GetStatsFromLine(char *, TPStats *);
++int GetStatsFromLine(const char *, TPStats *);
+ char * CreateLineFromStats(TPStats *, char *);
+ int ReplyCode(char *);
+ void TVAddUSec(struct timeval *, int);
diff --git a/net-analyzer/tptest/tptest-3.1.7-r1.ebuild b/net-analyzer/tptest/tptest-3.1.7-r2.ebuild
index 30f9c1a467b2..239925e8c45a 100644
--- a/net-analyzer/tptest/tptest-3.1.7-r1.ebuild
+++ b/net-analyzer/tptest/tptest-3.1.7-r2.ebuild
@@ -1,10 +1,10 @@
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tptest/tptest-3.1.7-r1.ebuild,v 1.1 2010/09/20 18:32:35 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tptest/tptest-3.1.7-r2.ebuild,v 1.1 2013/10/04 20:51:42 creffett Exp $
-EAPI="2"
+EAPI=5
-inherit toolchain-funcs
+inherit toolchain-funcs eutils
MY_PV="${PV/./_}"
@@ -17,11 +17,14 @@ SLOT="0"
KEYWORDS="~amd64 ~ppc ~sparc ~x86"
IUSE=""
+RDEPEND=""
+DEPEND=""
+
src_prepare() {
sed -i apps/unix/{client,server}/Makefile \
-e "s:^CFLAGS[[:space:]]*=:CFLAGS+=:" \
|| die "sed Makefiles"
-
+ epatch "${FILESDIR}/${PN}-3.1.7-getstatsfromlinevuln.patch"
cp -f os-dep/unix/* .
cp -f engine/* .
}