summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-23 20:20:39 -0500
committerXANTRONIX Development2022-02-23 20:22:52 -0500
commit4d8f0128df8a49428a155f16a0de34621bed0f56 (patch)
tree551472a60ffc91af34aec5f7176dd890bcee9317
parent3cdeff30607fed1f5438ce5dd8ecff7d75c63dd5 (diff)
downloadxas-4d8f0128df8a49428a155f16a0de34621bed0f56.tar.gz
xas-4d8f0128df8a49428a155f16a0de34621bed0f56.tar.bz2
xas-4d8f0128df8a49428a155f16a0de34621bed0f56.zip
Avoid xas_bank_record() infinite loop
-rw-r--r--src/bank.c2
1 files changed, 2 insertions, 0 deletions
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,