From 835136dcd36b8ae6b732e945a929f8b39f3476bc Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 10 Feb 2017 22:24:36 +0100 Subject: [PATCH] output/Thread: add assertion on the ao_plugin_play() result --- src/output/OutputThread.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/output/OutputThread.cxx b/src/output/OutputThread.cxx index 71e7c5409..0f10b47f0 100644 --- a/src/output/OutputThread.cxx +++ b/src/output/OutputThread.cxx @@ -297,6 +297,7 @@ AudioOutput::PlayChunk() try { const ScopeUnlock unlock(mutex); nbytes = ao_plugin_play(*this, data.data, data.size); + assert(nbytes <= data.size); } catch (const std::runtime_error &e) { FormatError(e, "\"%s\" [%s] failed to play", name, plugin.name);