File stream_decoder.c-Fix-a-memory-leak.patch of Package flac.30364

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.
---
 src/libFLAC/stream_decoder.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/src/libFLAC/stream_decoder.c
+++ b/src/libFLAC/stream_decoder.c
@@ -1747,6 +1747,8 @@ FLAC__bool read_metadata_vorbiscomment_(
 				}
 				if (obj->comments[i].length > 0) {
 					if (length < obj->comments[i].length) {
+						free (obj->comments[i].entry) ;
+						obj->comments[i].entry = NULL ;
 						obj->num_comments = i;
 						goto skip;
 					}
openSUSE Build Service is sponsored by