From 46e059efacd844e7f32f240e7efa441811b84527 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 Dec 2024 19:49:53 -0500 Subject: Add an assert to guard out of bounds access --- plugins/eg-scope.lv2/examploscope_ui.c | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/eg-scope.lv2') 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]; -- cgit v1.2.1