From eead97f10303436b8da1c75dcdaa79efaba5b015 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 4 May 2015 23:54:38 +0200 Subject: ao_coreaudio: fix out of bounds access ca_label_to_mp_speaker_id() checked whether the last entry was >= 0, but actually this condition was never true, and MP_SPEAKER_ID_UNKNOWN0 is not negative. --- audio/out/ao_coreaudio.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'audio/out') diff --git a/audio/out/ao_coreaudio.c b/audio/out/ao_coreaudio.c index 5e923ac084..8716fcc75d 100644 --- a/audio/out/ao_coreaudio.c +++ b/audio/out/ao_coreaudio.c @@ -446,6 +446,8 @@ static const int speaker_map[][2] = { { kAudioChannelLabel_HeadphonesRight, MP_SPEAKER_ID_DR }, { kAudioChannelLabel_Unknown, MP_SPEAKER_ID_UNKNOWN0 }, + + { 0, -1 }, }; static int ca_label_to_mp_speaker_id(AudioChannelLabel label) -- cgit v1.2.3