summaryrefslogtreecommitdiff
path: root/gtk2_ardour/export_report.cc
diff options
context:
space:
mode:
authorColin Fletcher <colin.m.fletcher@googlemail.com>2016-03-20 11:19:31 +0000
committerColin Fletcher <colin.m.fletcher@googlemail.com>2016-03-20 11:19:31 +0000
commit8df6101fd39c50cf40b7a4991bbba50ea59feda3 (patch)
treee3e5a42078840e48dfe51f07b06021b113c5f29d /gtk2_ardour/export_report.cc
parent7840bb1b14dcf2501b2cd6adc3f2960397a115f7 (diff)
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.
Diffstat (limited to 'gtk2_ardour/export_report.cc')
-rw-r--r--gtk2_ardour/export_report.cc2
1 files changed, 1 insertions, 1 deletions
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 {