From 3824bf66cae70b448dd8b99252fc3e823b40e150 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 12 Mar 2020 20:32:04 +0100 Subject: [PATCH] lib/chromaprint/DecoderClient: add assertion --- src/lib/chromaprint/DecoderClient.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/chromaprint/DecoderClient.cxx b/src/lib/chromaprint/DecoderClient.cxx index 35f47e840..2081db1e8 100644 --- a/src/lib/chromaprint/DecoderClient.cxx +++ b/src/lib/chromaprint/DecoderClient.cxx @@ -68,6 +68,8 @@ ChromaprintDecoderClient::SubmitData(InputStream *, const void *_data, size_t length, uint16_t) noexcept { + assert(ready); + if (length > remaining_bytes) remaining_bytes = 0; else