diff options
author | Max Kellermann <max@musicpd.org> | 2018-02-09 19:01:12 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-02-09 19:01:12 +0100 |
commit | 6de92bb42bb61e7eb849bd554429579d6c61a77e (patch) | |
tree | f5ef2b9ab85b840fc11ee264fdb7b0f16c6f2026 /src | |
parent | c801936e531222ba1cb526c585d8ece3e68315bf (diff) |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/pcm/Order.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pcm/Order.cxx b/src/pcm/Order.cxx index 1812b14dd..736eb472d 100644 --- a/src/pcm/Order.cxx +++ b/src/pcm/Order.cxx @@ -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 }; } |