[vlc-commits] asf: check malloc

Thomas Guillem git at videolan.org
Tue Sep 26 13:40:19 CEST 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Sep 26 13:36:16 2017 +0200| [745361ad2bcc85e7cd73d637f99d9663f4426194] | committer: Thomas Guillem

asf: check malloc

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=745361ad2bcc85e7cd73d637f99d9663f4426194
---

 modules/demux/asf/asf.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/demux/asf/asf.c b/modules/demux/asf/asf.c
index 65603d75c7..dc32109091 100644
--- a/modules/demux/asf/asf.c
+++ b/modules/demux/asf/asf.c
@@ -878,6 +878,8 @@ static int DemuxInit( demux_t *p_demux )
         p_esp = NULL;
 
         tk = p_sys->track[p_sp->i_stream_number] = malloc( sizeof( asf_track_t ) );
+        if (!tk)
+            goto error;
         memset( tk, 0, sizeof( asf_track_t ) );
 
         tk->i_time = -1;



More information about the vlc-commits mailing list