[qtiplot] 03/06: Fix stack overflow in Correlation.cpp. (Closes: #805534)

Anton Gladky gladk at moszumanska.debian.org
Sun Dec 6 06:31:56 UTC 2015


This is an automated email from the git hooks/post-receive script.

gladk pushed a commit to branch master
in repository qtiplot.

commit fc32fcfd9e39acda79ea19a1df3daf07ecfd3264
Author: Mirko Scholz <scholz at chemie.uni-siegen.de>
Date:   Sat Dec 5 22:54:18 2015 +0100

    Fix stack overflow in Correlation.cpp. (Closes: #805534)
---
 debian/patches/fix_stack_overflow.patch | 24 ++++++++++++++++++++++++
 debian/patches/series                   |  1 +
 2 files changed, 25 insertions(+)

diff --git a/debian/patches/fix_stack_overflow.patch b/debian/patches/fix_stack_overflow.patch
new file mode 100644
index 0000000..8b30ee1
--- /dev/null
+++ b/debian/patches/fix_stack_overflow.patch
@@ -0,0 +1,24 @@
+Description: Fix stack overflow in Correlation.cpp
+Author: Mirko Scholz <scholz at chemie.uni-siegen.de>
+Bug-Debian: https://bugs.debian.org/805534
+Last-Update: 2015-12-05
+
+--- qtiplot-0.9.8.9.orig/qtiplot/src/analysis/Correlation.cpp
++++ qtiplot-0.9.8.9/qtiplot/src/analysis/Correlation.cpp
+@@ -157,7 +157,8 @@ void Correlation::addResultCurve()
+ 	d_table->addCol();
+ 	int n = d_n/2;
+ 
+-    double x_temp[d_n], y_temp[d_n];
++	double *x_temp = new double[d_n];
++	double *y_temp = new double[d_n];
+ 	for (int i = 0; i<d_n; i++){
+ 	    double x = i - n;
+         x_temp[i] = x;
+@@ -192,4 +193,6 @@ void Correlation::addResultCurve()
+ 		d_output_graph->insertPlotItem(c, Graph::Line);
+ 		d_output_graph->updatePlot();
+ 	}
++	delete[] x_temp;
++	delete[] y_temp;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index e7557bf..4b2575f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ set_col_values.patch
 sipFTBFS.patch
 disable_en_pdf.patch
 10_adopt_to_gsl2.diff
+fix_stack_overflow.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/qtiplot.git



More information about the debian-science-commits mailing list