From f9319bc6bd71cbc92f9b8e7b11420d0e650a981e Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Sat, 3 Aug 2024 17:48:29 +0200 Subject: [PATCH] Remove source of memory errors: read and write beyond boundaries caused segfaults. --- src/frontend/sndprint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/sndprint.c b/src/frontend/sndprint.c index 64f9e525a..99fcbec25 100644 --- a/src/frontend/sndprint.c +++ b/src/frontend/sndprint.c @@ -227,7 +227,7 @@ void snd_init(int nchannel) { sp_buf = calloc(nchannel, sizeof(SP_BUF)); for (i = 0; i < SP_MAX; i++) { sp_buf[i].tme = 0.0; - sp_buf[i].val = calloc(nchannel, sizeof(float)); + sp_buf[i].val = calloc(nchannel, sizeof(double)); } sample = 0; #ifdef HAVE_SRC