spa: alsa: Fix off-by-one check in ELD channel position parsing

This commit is contained in:
Arun Raghavan 2025-12-17 11:07:20 -08:00
parent 12b2e5d67c
commit e2262617aa

View file

@ -1148,7 +1148,7 @@ static int hdmi_eld_changed(snd_mixer_elem_t *melem, unsigned int mask)
#define _ADD_CHANNEL_POSITION(pos) \ #define _ADD_CHANNEL_POSITION(pos) \
{ \ { \
if (i + 1 < eld.lpcm_channels) \ if (i < eld.lpcm_channels) \
positions[i++] = pos; \ positions[i++] = pos; \
} }