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
This commit is contained in:
parent
c801936e53
commit
6de92bb42b
2
NEWS
2
NEWS
|
@ -1,4 +1,6 @@
|
||||||
ver 0.20.17 (not yet released)
|
ver 0.20.17 (not yet released)
|
||||||
|
* output
|
||||||
|
- alsa: fix crash bug with 8 channels
|
||||||
* fix real-time and idle scheduling with Musl
|
* fix real-time and idle scheduling with Musl
|
||||||
|
|
||||||
ver 0.20.16 (2018/02/03)
|
ver 0.20.16 (2018/02/03)
|
||||||
|
|
|
@ -88,7 +88,7 @@ static inline ConstBuffer<V>
|
||||||
ToAlsaChannelOrder71(PcmBuffer &buffer, ConstBuffer<V> src)
|
ToAlsaChannelOrder71(PcmBuffer &buffer, ConstBuffer<V> src)
|
||||||
{
|
{
|
||||||
auto dest = buffer.GetT<V>(src.size);
|
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 };
|
return { dest, src.size };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue