[packages/sipp] Fixed crash in CSV statistics writer
jajcus
jajcus at pld-linux.org
Fri Jun 14 15:51:04 CEST 2013
commit e6825a1985abe2f4a5ef179265641adac6bc0bb1
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date: Fri Jun 14 15:49:02 2013 +0200
Fixed crash in CSV statistics writer
sipp-stats_crash.patch | 21 +++++++++++++++++++++
sipp.spec | 3 ++-
2 files changed, 23 insertions(+), 1 deletion(-)
---
diff --git a/sipp.spec b/sipp.spec
index e580d06..c8634c6 100644
--- a/sipp.spec
+++ b/sipp.spec
@@ -1,4 +1,3 @@
-#
Summary: SIPp - a performance testing tool for the SIP protocol
Name: sipp
Version: 3.3
@@ -9,6 +8,7 @@ Source0: http://dl.sourceforge.net/sipp/%{name}-%{version}.tar.xz
# Source0-md5: f0c4f472fa86de8a528cb91616323617
Patch0: %{name}-headers.patch
Patch1: %{name}-sprintf.patch
+Patch2: %{name}-stats_crash.patch
URL: http://sipp.sourceforge.net/
BuildRequires: libpcap-devel
BuildRequires: libstdc++-devel
@@ -36,6 +36,7 @@ system.
%setup -q
%patch0 -p1
%patch1 -p1
+%patch2 -p1
%build
diff --git a/sipp-stats_crash.patch b/sipp-stats_crash.patch
new file mode 100644
index 0000000..ba8b883
--- /dev/null
+++ b/sipp-stats_crash.patch
@@ -0,0 +1,21 @@
+diff -dur sipp-3.3.orig/stat.cpp sipp-3.3/stat.cpp
+--- sipp-3.3.orig/stat.cpp 2013-05-27 10:48:19.000000000 +0200
++++ sipp-3.3/stat.cpp 2013-05-27 11:00:15.000000000 +0200
+@@ -1140,7 +1140,7 @@
+ char* CStat::sRepartitionInfo(T_dynamicalRepartition * tabRepartition,
+ int sizeOfTab)
+ {
+- static char *repartitionInfo;
++ static char *repartitionInfo = NULL;
+ char buffer[MAX_CHAR_BUFFER_SIZE];
+ int dlen = strlen(stat_delimiter);
+
+@@ -1148,7 +1148,7 @@
+ {
+ // if a repartition is present, this field match the repartition name
+ repartitionInfo = (char *)realloc(repartitionInfo, dlen + 1);
+- strcpy(stat_delimiter, repartitionInfo);
++ strcpy(repartitionInfo, stat_delimiter);
+ for(int i=0; i<(sizeOfTab-1); i++)
+ {
+ sprintf(buffer, "%lu%s", tabRepartition[i].nbInThisBorder, stat_delimiter);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/sipp.git/commitdiff/3807eea2d015e91b7b7ab5a65a317270c476e3f1
More information about the pld-cvs-commit
mailing list