[vlc-devel] [PATCH 12/25] mux:asf: fix unchecked memory allocation
Steve Lhomme
robux4 at videolabs.io
Mon Jul 10 16:52:16 CEST 2017
---
modules/mux/asf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/mux/asf.c b/modules/mux/asf.c
index 15890e59b9..8fb7e67aa0 100644
--- a/modules/mux/asf.c
+++ b/modules/mux/asf.c
@@ -346,6 +346,8 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
}
tk = p_input->p_sys = malloc( sizeof( asf_track_t ) );
+ if( unlikely(p_input->p_sys == NULL) )
+ return VLC_ENOMEM;
memset( tk, 0, sizeof( *tk ) );
tk->i_cat = p_input->p_fmt->i_cat;
tk->i_sequence = 0;
--
2.12.1
More information about the vlc-devel
mailing list