summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-4156.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-4156.patch')
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-4156.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-4156.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-4156.patch
new file mode 100644
index 0000000000..f7ae82588f
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2021-4156.patch
@@ -0,0 +1,30 @@
1From ced91d7b971be6173b604154c39279ce90ad87cc Mon Sep 17 00:00:00 2001
2From: yuan <ssspeed00@gmail.com>
3Date: Tue, 20 Apr 2021 16:16:32 +0800
4Subject: [PATCH] flac: Fix improper buffer reusing (#732)
5
6Upstream-Status: Backport [https://github.com/libsndfile/libsndfile/commit/ced91d7b971be6173b604154c39279ce90ad87cc]
7CVE: CVE-2021-4156
8Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
9---
10 src/flac.c | 4 ++++
11 1 file changed, 4 insertions(+)
12
13diff --git a/src/flac.c b/src/flac.c
14index 0be82ac..4fa5cfa 100644
15--- a/src/flac.c
16+++ b/src/flac.c
17@@ -952,7 +952,11 @@ flac_read_loop (SF_PRIVATE *psf, unsigned len)
18 /* Decode some more. */
19 while (pflac->pos < pflac->len)
20 { if (FLAC__stream_decoder_process_single (pflac->fsd) == 0)
21+ { psf_log_printf (psf, "FLAC__stream_decoder_process_single returned false\n") ;
22+ /* Current frame is busted, so NULL the pointer. */
23+ pflac->frame = NULL ;
24 break ;
25+ } ;
26 state = FLAC__stream_decoder_get_state (pflac->fsd) ;
27 if (state >= FLAC__STREAM_DECODER_END_OF_STREAM)
28 { psf_log_printf (psf, "FLAC__stream_decoder_get_state returned %s\n", FLAC__StreamDecoderStateString [state]) ;
29--
302.40.1