vlc | branch: master | Francois Cartegnie <[email protected]> | Tue Mar 17 15:59:41 2015 +0100| [fc81c4e2b55c1367bbf67cb7a2b98bb63d4ca6d1] | committer: Francois Cartegnie
demux: mp4: don't NULL dereference on failed realloc > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fc81c4e2b55c1367bbf67cb7a2b98bb63d4ca6d1 --- modules/mux/mp4.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/mux/mp4.c b/modules/mux/mp4.c index 10fd8ca..e507eb4 100644 --- a/modules/mux/mp4.c +++ b/modules/mux/mp4.c @@ -721,7 +721,8 @@ static int Mux(sout_mux_t *p_mux) static block_t *ConvertSUBT(block_t *p_block) { p_block = block_Realloc(p_block, 2, p_block->i_buffer); - + if( !p_block ) + return NULL; /* No trailling '\0' */ if (p_block->i_buffer > 2 && p_block->p_buffer[p_block->i_buffer-1] == '\0') p_block->i_buffer--; @@ -2836,6 +2837,9 @@ static int MuxFrag(sout_mux_t *p_mux) break; } + if( !p_currentblock ) + return VLC_ENOMEM; + /* If we have a previous entry for outgoing queue */ if (p_stream->p_held_entry) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
