Commit 6de92bb4 authored by Max Kellermann's avatar Max Kellermann

pcm/Order: fix size calculation with 8 channels

This was a buffer overflow bug which could cause MPD crahes when playing back 8 channels with the ALSA output plugin. Closes #216
parent c801936e
ver 0.20.17 (not yet released)
* output
- alsa: fix crash bug with 8 channels
* fix real-time and idle scheduling with Musl
ver 0.20.16 (2018/02/03)
......
......@@ -88,7 +88,7 @@ static inline ConstBuffer<V>
ToAlsaChannelOrder71(PcmBuffer &buffer, ConstBuffer<V> src)
{
auto dest = buffer.GetT<V>(src.size);
ToAlsaChannelOrder71(dest, src.data, src.size / 6);
ToAlsaChannelOrder71(dest, src.data, src.size / 8);
return { dest, src.size };
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment