From 026b74e25d3cceec35a5e32d85d393911cad6013 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Wed, 21 Aug 2019 03:51:23 +0200 Subject: [PATCH] Fix potential call of uninitialized pointer function _template_number can be set via sysex to an arbitrary number, this can lead to calling a filter-function at an undefined address, usually a segfault. --- libs/surfaces/launch_control_xl/launch_control_xl.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/surfaces/launch_control_xl/launch_control_xl.cc b/libs/surfaces/launch_control_xl/launch_control_xl.cc index 20dd73f8b2..4eb379a639 100644 --- a/libs/surfaces/launch_control_xl/launch_control_xl.cc +++ b/libs/surfaces/launch_control_xl/launch_control_xl.cc @@ -1002,6 +1002,8 @@ LaunchControlXL::filter_stripables(StripableList& strips) const FilterFunction flt; switch ((int)template_number()) { + default: + /* FALLTHROUGH */ case 8: flt = &flt_default; break;