[vlc-commits] demux: libmp4: fix fwd null dereference (cid #1260237)
Francois Cartegnie
git at videolan.org
Mon Dec 22 19:22:11 CET 2014
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Dec 22 18:50:13 2014 +0100| [e1124316948655e97f3a6c4fef77ab869285f506] | committer: Francois Cartegnie
demux: libmp4: fix fwd null dereference (cid #1260237)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e1124316948655e97f3a6c4fef77ab869285f506
---
modules/demux/mp4/libmp4.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/libmp4.c b/modules/demux/mp4/libmp4.c
index 33bf66e..d962b7a 100644
--- a/modules/demux/mp4/libmp4.c
+++ b/modules/demux/mp4/libmp4.c
@@ -297,10 +297,12 @@ static void MP4_BoxOffsetUp( MP4_Box_t *p_box, uint64_t i_offset )
static int MP4_ReadBoxContainerRawInBox( stream_t *p_stream, MP4_Box_t *p_container,
uint8_t *p_buffer, uint64_t i_size, uint64_t i_offset )
{
+ if(!p_container)
+ return 0;
stream_t *p_substream = stream_MemoryNew( p_stream, p_buffer, i_size, true );
if( !p_substream )
return 0;
- MP4_Box_t *p_last = (p_container) ? p_container->p_last : NULL;
+ MP4_Box_t *p_last = p_container->p_last;
MP4_ReadBoxContainerRaw( p_substream, p_container );
stream_Delete( p_substream );
/* do pos fixup */
More information about the vlc-commits
mailing list