netjack2: check config against MAX_CHANNELS

Check that the params don't include more than MAX_CHANNELS of audio or
else we overflow the position array.

Adapt to the compiled value of SPA_AUDIO_MAX_CHANNELS but allow at least
128 channels.
This commit is contained in:
Wim Taymans 2026-05-08 11:07:03 +02:00
parent 6cee86e509
commit 753eae9302
3 changed files with 17 additions and 14 deletions

View file

@ -9,6 +9,8 @@
#endif
#define MAX_CHANNELS SPA_AUDIO_MAX_CHANNELS
#define MAX_MIDI 128u
#define MAX_PORTS (MAX_CHANNELS > MAX_MIDI ? MAX_CHANNELS : MAX_MIDI)
struct volume {
bool mute;