From 8df6101fd39c50cf40b7a4991bbba50ea59feda3 Mon Sep 17 00:00:00 2001 From: Colin Fletcher Date: Sun, 20 Mar 2016 11:19:31 +0000 Subject: [PATCH] fix out-of-bounds array access in export report. cppcheck reports "gtk2_ardour/export_report.cc:260: error: Array 'y0[4]' accessed at index 4, which is out of bounds.", which seems indeed to be the case. --- gtk2_ardour/export_report.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk2_ardour/export_report.cc b/gtk2_ardour/export_report.cc index 8d3b78c2ef..80607f16a0 100644 --- a/gtk2_ardour/export_report.cc +++ b/gtk2_ardour/export_report.cc @@ -248,7 +248,7 @@ ExportReport::init (const AnalysisResults & ar, bool with_file) mnw = (m_l - /*hist-width*/ 540 - /*box spacing*/ 8 + /*peak-width*/ 800 + m_r) / 2; const int nw2 = mnw / 2; // nums, horizontal center - int y0[4]; + int y0[6]; if (p->normalized) { y0[0] = (hh - ht) * .5; } else {