]> git.pld-linux.org Git - packages/sipp.git/blobdiff - sipp-stats_crash.patch
Fixed crash in CSV statistics writer
[packages/sipp.git] / sipp-stats_crash.patch
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);
This page took 0.070114 seconds and 4 git commands to generate.