[vlc-commits] access: dvdnav: check alloc

Francois Cartegnie git at videolan.org
Mon Aug 19 20:49:34 CEST 2019


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Aug 19 14:49:30 2019 +0200| [897c26e4adb7aec95943856b94871107490b83eb] | committer: Francois Cartegnie

access: dvdnav: check alloc

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

 modules/access/dvdnav.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/access/dvdnav.c b/modules/access/dvdnav.c
index ddbe6ee220..540e9aad4d 100644
--- a/modules/access/dvdnav.c
+++ b/modules/access/dvdnav.c
@@ -1397,6 +1397,8 @@ static int DemuxBlock( demux_t *p_demux, const uint8_t *p, int len )
 
         /* Create a block */
         block_t *p_pkt = block_Alloc( i_size );
+        if( !p_pkt )
+            return VLC_EGENERIC;
         memcpy( p_pkt->p_buffer, p, i_size);
 
         /* Parse it and send it */



More information about the vlc-commits mailing list