Please sign in to comment.
libmyth: Prevent an access violation by the ALSA library
In audiooutputalsa.cpp, AudioOutputALSA::GetALSADevices calls the ALSA API snd_device_name_hint with a card index of -1 to obtain a list of hints for all cards. Unfortunately, with libasound.so.2.0 this API can cause an access violation when the card index is -1. Running with valgrind shows that snd_device_name_hint makes reference to previously freed memory when the card index is -1. This patch enumerates the cards using other ALSA APIs, thus avoiding the SEGV. Signed-off-by: Jean-Yves Avenard <firstname.lastname@example.org>
- Loading branch information...
Showing with 35 additions and 17 deletions.