diff options
author | wm4 <wm4@nowhere> | 2015-05-04 23:54:38 +0200 |
---|---|---|
committer | Diogo Franco (Kovensky) <diogomfranco@gmail.com> | 2015-05-07 10:46:36 +0900 |
commit | e0ad4ec8aab298eefbe74f146028c5eea7e66a1d (patch) | |
tree | 7328838512b4ed3f3f9876aedf6b5210caefaa0e | |
parent | 8a46b5b711fcc7fc41bea1f2f9046b4b1f313e56 (diff) | |
download | mpv-e0ad4ec8aab298eefbe74f146028c5eea7e66a1d.tar.bz2 mpv-e0ad4ec8aab298eefbe74f146028c5eea7e66a1d.tar.xz |
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.
(cherry picked from commit eead97f10303436b8da1c75dcdaa79efaba5b015)
-rw-r--r-- | audio/out/ao_coreaudio.c | 2 |
1 files changed, 2 insertions, 0 deletions
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) |