[vlc-commits] demux: mp4: fix null deref in rtp stuff
Francois Cartegnie
git at videolan.org
Wed Jun 1 14:00:08 CEST 2016
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jun 1 13:48:14 2016 +0200| [8d3f04dca01380baa51eb5e4724a68c1e384b24b] | committer: Francois Cartegnie
demux: mp4: fix null deref in rtp stuff
block_Realloc != realloc
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d3f04dca01380baa51eb5e4724a68c1e384b24b
---
modules/demux/mp4/mp4.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index ee11dd9..0e71a9d 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -932,7 +932,9 @@ static block_t * MP4_RTPHintToFrame( demux_t *p_demux, block_t *p_block, uint32_
goto error;
}
- block_t *p_realloc = block_Realloc( p_newblock, 0, i_payload + sample_cons.length + 4 );
+ block_t *p_realloc = ( p_newblock ) ?
+ block_Realloc( p_newblock, 0, i_payload + sample_cons.length + 4 ):
+ block_Alloc( i_payload + sample_cons.length + 4 );
if( !p_realloc )
goto error;
More information about the vlc-commits
mailing list