aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/eg-scope.lv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-12-11 19:49:53 -0500
committerDavid Robillard <d@drobilla.net>2024-12-11 19:49:53 -0500
commit46e059efacd844e7f32f240e7efa441811b84527 (patch)
treebfdb13c4e2eb861f82ad3af1a7285e4cfa18e4e5 /plugins/eg-scope.lv2
parent1a49b64024c68e8a1f308c58513a40afaa547f7b (diff)
downloadlv2-46e059efacd844e7f32f240e7efa441811b84527.tar.xz
Add an assert to guard out of bounds access
Diffstat (limited to 'plugins/eg-scope.lv2')
-rw-r--r--plugins/eg-scope.lv2/examploscope_ui.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/eg-scope.lv2/examploscope_ui.c b/plugins/eg-scope.lv2/examploscope_ui.c
index 0a0e5df..2ad42dc 100644
--- a/plugins/eg-scope.lv2/examploscope_ui.c
+++ b/plugins/eg-scope.lv2/examploscope_ui.c
@@ -206,6 +206,7 @@ on_expose_event(GtkWidget* widget, GdkEventExpose* ev, gpointer data)
assert(start < DAWIDTH);
assert(end <= DAWIDTH);
assert(start < end);
+ assert(ui->n_channels <= 2U);
for (uint32_t c = 0; c < ui->n_channels; ++c) {
ScoChan* chn = &ui->chn[c];