]> git.pld-linux.org Git - packages/sipp.git/commitdiff
Fixed crash in CSV statistics writer
authorJacek Konieczny <j.konieczny@eggsoft.pl>
Fri, 14 Jun 2013 13:49:02 +0000 (15:49 +0200)
committerJacek Konieczny <jajcus@jajcus.net>
Fri, 14 Jun 2013 13:49:02 +0000 (15:49 +0200)
sipp-stats_crash.patch [new file with mode: 0644]
sipp.spec

diff --git a/sipp-stats_crash.patch b/sipp-stats_crash.patch
new file mode 100644 (file)
index 0000000..ba8b883
--- /dev/null
@@ -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);
index e580d0643eb59fa1096fb1ead3ba7e26df71cbd9..c8634c6000c419d350d5f27712086fa65190aff3 100644 (file)
--- 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
 
This page took 0.067135 seconds and 4 git commands to generate.