Blame patches/libflac/CVE-2017-6888.patch

Lucio Andrés Illanes Albornoz 82c217
From 4f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17 00:00:00 2001
Lucio Andrés Illanes Albornoz 82c217
From: Erik de Castro Lopo <erikd@mega-nerd.com>
Lucio Andrés Illanes Albornoz 82c217
Date: Sat, 8 Apr 2017 18:34:49 +1000
Lucio Andrés Illanes Albornoz 82c217
Subject: [PATCH] stream_decoder.c: Fix a memory leak
Lucio Andrés Illanes Albornoz 82c217
Lucio Andrés Illanes Albornoz 82c217
Leak reported by Secunia Research.
Lucio Andrés Illanes Albornoz 82c217
---
Lucio Andrés Illanes Albornoz 82c217
 src/libFLAC/stream_decoder.c | 3 +++
Lucio Andrés Illanes Albornoz 82c217
 1 file changed, 3 insertions(+)
Lucio Andrés Illanes Albornoz 82c217
Lucio Andrés Illanes Albornoz 82c217
diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
Lucio Andrés Illanes Albornoz 82c217
index 14d5fe7..a552751 100644
Lucio Andrés Illanes Albornoz 82c217
--- a/src/libFLAC/stream_decoder.c
Lucio Andrés Illanes Albornoz 82c217
+++ b/src/libFLAC/stream_decoder.c
Lucio Andrés Illanes Albornoz 82c217
@@ -1753,6 +1753,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
Lucio Andrés Illanes Albornoz 82c217
 					}
Lucio Andrés Illanes Albornoz 82c217
 					memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
Lucio Andrés Illanes Albornoz 82c217
 					if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
Lucio Andrés Illanes Albornoz 82c217
+						/* Current i-th entry is bad, so we delete it. */
Lucio Andrés Illanes Albornoz 82c217
+						free (obj->comments[i].entry) ;
Lucio Andrés Illanes Albornoz 82c217
+						obj->comments[i].entry = NULL ;
Lucio Andrés Illanes Albornoz 82c217
 						obj->num_comments = i;
Lucio Andrés Illanes Albornoz 82c217
 						goto skip;
Lucio Andrés Illanes Albornoz 82c217
 					}
Lucio Andrés Illanes Albornoz 82c217
-- 
Lucio Andrés Illanes Albornoz 82c217
2.1.4
Lucio Andrés Illanes Albornoz 82c217