Blame SOURCES/libsndfile-1.0.31-ced91d7b.patch

84ffe4
From ced91d7b971be6173b604154c39279ce90ad87cc Mon Sep 17 00:00:00 2001
84ffe4
From: yuan <ssspeed00@gmail.com>
84ffe4
Date: Tue, 20 Apr 2021 16:16:32 +0800
84ffe4
Subject: [PATCH] flac: Fix improper buffer reusing (#732)
84ffe4
84ffe4
---
84ffe4
 src/flac.c | 4 ++++
84ffe4
 1 file changed, 4 insertions(+)
84ffe4
84ffe4
diff --git a/src/flac.c b/src/flac.c
84ffe4
index 64d0172e6..e33204505 100644
84ffe4
--- a/src/flac.c
84ffe4
+++ b/src/flac.c
84ffe4
@@ -948,7 +948,11 @@ flac_read_loop (SF_PRIVATE *psf, unsigned len)
84ffe4
 	/* Decode some more. */
84ffe4
 	while (pflac->pos < pflac->len)
84ffe4
 	{	if (FLAC__stream_decoder_process_single (pflac->fsd) == 0)
84ffe4
+		{	psf_log_printf (psf, "FLAC__stream_decoder_process_single returned false\n") ;
84ffe4
+			/* Current frame is busted, so NULL the pointer. */
84ffe4
+			pflac->frame = NULL ;
84ffe4
 			break ;
84ffe4
+			} ;
84ffe4
 		state = FLAC__stream_decoder_get_state (pflac->fsd) ;
84ffe4
 		if (state >= FLAC__STREAM_DECODER_END_OF_STREAM)
84ffe4
 		{	psf_log_printf (psf, "FLAC__stream_decoder_get_state returned %s\n", FLAC__StreamDecoderStateString [state]) ;