From 4d8f0128df8a49428a155f16a0de34621bed0f56 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Wed, 23 Feb 2022 20:20:39 -0500 Subject: Avoid xas_bank_record() infinite loop --- src/bank.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/bank.c b/src/bank.c index 2f6151b..9cb276a 100644 --- a/src/bank.c +++ b/src/bank.c @@ -64,6 +64,8 @@ ssize_t xas_bank_record(xas_bank *bank, if ((readlen = xas_audio_stream_read(input, &buf, amount)) < 0) { goto error_audio_stream_read; + } else if (readlen == 0) { + break; } xas_audio_copy(bank->format, -- cgit v1.2.3