[vlc-devel] [PATCH] contrib: libmad: fix memory leak
Hannes Domani
ssbssa at yahoo.de
Fri Jul 8 18:31:29 CEST 2016
---
contrib/src/mad/check-bitstream-length.patch | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/contrib/src/mad/check-bitstream-length.patch b/contrib/src/mad/check-bitstream-length.patch
index 0540559..f36e158 100644
--- a/contrib/src/mad/check-bitstream-length.patch
+++ b/contrib/src/mad/check-bitstream-length.patch
@@ -373,7 +373,7 @@
if (decode_header(header, stream) == -1)
goto fail;
-@@ -460,14 +460,14 @@
+@@ -460,14 +460,16 @@
/* ancillary_data() */
if (frame->header.layer != MAD_LAYER_III) {
@@ -385,6 +385,8 @@
- stream->anc_ptr = stream->ptr;
- stream->anc_bitlen = mad_bit_length(&stream->ptr, &next_frame);
++ if (stream->l_ptr != stream->l_anc_ptr)
++ free(stream->l_anc_ptr);
+ stream->l_anc_ptr = stream->l_ptr;
+ stream->anc_bitlen = mad_bit_w_len_length(stream->l_ptr, &next_frame);
--
2.9.0
More information about the vlc-devel
mailing list