[vlc-commits] vobsub: check memory error
Rémi Denis-Courmont
git at videolan.org
Sat Aug 11 10:43:10 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 11 11:42:53 2012 +0300| [71786a23726ddffbfb015d4cd2a3826b47041c8c] | committer: Rémi Denis-Courmont
vobsub: check memory error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=71786a23726ddffbfb015d4cd2a3826b47041c8c
---
modules/demux/vobsub.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/demux/vobsub.c b/modules/demux/vobsub.c
index 68da046..060f152 100644
--- a/modules/demux/vobsub.c
+++ b/modules/demux/vobsub.c
@@ -675,6 +675,8 @@ static int DemuxVobSub( demux_t *p_demux, block_t *p_bk )
/* Create a block */
p_pkt = block_New( p_demux, i_size );
+ if( unlikely(p_pkt == NULL) )
+ break;
memcpy( p_pkt->p_buffer, p, i_size);
p += i_size;
More information about the vlc-commits
mailing list