[vlc-devel] [PATCH 13/25] mux:mpeg:ps: fix unchecked memory allocation
Steve Lhomme
robux4 at videolabs.io
Mon Jul 10 16:52:17 CEST 2017
---
modules/mux/mpeg/ps.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/mux/mpeg/ps.c b/modules/mux/mpeg/ps.c
index 7d3de9708a..bba06f824d 100644
--- a/modules/mux/mpeg/ps.c
+++ b/modules/mux/mpeg/ps.c
@@ -267,6 +267,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
(char*)&p_input->p_fmt->i_codec );
p_input->p_sys = p_stream = malloc( sizeof( ps_stream_t ) );
+ if( unlikely(p_input->p_sys == NULL) )
+ return VLC_ENOMEM;
p_stream->i_stream_type = 0x81;
/* Init this new stream */
--
2.12.1
More information about the vlc-devel
mailing list