oss_put_buffer_out() asserts size < hw->size_emul, but a write that
fills the entire buffer (size == size_emul) is valid. Use <= instead.

Reported-by: Pavee Hui <[email protected]>
Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api")
Signed-off-by: Marc-André Lureau <[email protected]>
---
 audio/ossaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 95a07ea1cace..e35eab3110e5 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -393,7 +393,7 @@ static size_t oss_put_buffer_out(HWVoiceOut *hw, void *buf, 
size_t size)
 {
     OSSVoiceOut *oss = (OSSVoiceOut *) hw;
     if (oss->mmapped) {
-        assert(buf == hw->buf_emul + hw->pos_emul && size < hw->size_emul);
+        assert(buf == hw->buf_emul + hw->pos_emul && size <= hw->size_emul);
 
         hw->pos_emul = (hw->pos_emul + size) % hw->size_emul;
         return size;

-- 
2.56.0.rc0.29.g47ce80527c56


Reply via email to