vlc | branch: master | Steve Lhomme <[email protected]> | Mon Jul 10 13:41:21 2017 +0200| [41c3b400d6c4df271e63baefaf8ad76491edeb47] | committer: Jean-Baptiste Kempf
mux:mpeg:ps: fix unchecked memory allocation Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=41c3b400d6c4df271e63baefaf8ad76491edeb47 --- 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 */ _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
