diff options
author | Robin Gareus <robin@gareus.org> | 2019-08-21 03:51:23 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-08-21 03:53:46 +0200 |
commit | 026b74e25d3cceec35a5e32d85d393911cad6013 (patch) | |
tree | 37574f55945f3d5438a2dbd884ecf4b7e91a2aab /libs/surfaces | |
parent | c38c91ddbd0340b141a8af112d547b6534dfa6a4 (diff) |
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.
Diffstat (limited to 'libs/surfaces')
-rw-r--r-- | libs/surfaces/launch_control_xl/launch_control_xl.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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; |