mirror of
https://git.yoctoproject.org/poky
synced 2026-07-17 04:07:06 +00:00
288dbefdf3
stream_decoder.c: Fix a memory leak Leak reported by Secunia Research. Affects flac = 1.3.2 (From OE-Core rev: bca64ae1b02717c04edfee6dcc9a89cfa91d0c73) Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
From 4f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 00:00:00 2001
|
|
From: Erik de Castro Lopo <erikd@mega-nerd.com>
|
|
Date: Sat, 8 Apr 2017 18:34:49 +1000
|
|
Subject: [PATCH] stream_decoder.c: Fix a memory leak
|
|
|
|
Leak reported by Secunia Research.
|
|
CVE: CVE-2017-6888
|
|
Upstream-Status: Backport [https://git.xiph.org/?p=flac.git;a=commitdiff;h=4f47b63e9c971e6391590caf00a0f2a5ed612e67]
|
|
|
|
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
|
|
---
|
|
src/libFLAC/stream_decoder.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
|
|
index 14d5fe7f..a5527511 100644
|
|
--- a/src/libFLAC/stream_decoder.c
|
|
+++ b/src/libFLAC/stream_decoder.c
|
|
@@ -1753,6 +1753,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
|
|
}
|
|
memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
|
|
if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
|
|
+ /* Current i-th entry is bad, so we delete it. */
|
|
+ free (obj->comments[i].entry) ;
|
|
+ obj->comments[i].entry = NULL ;
|
|
obj->num_comments = i;
|
|
goto skip;
|
|
}
|
|
--
|
|
2.13.3
|
|
|